Files
NodeBB/src/controllers/admin/sounds.js

25 lines
411 B
JavaScript
Raw Normal View History

2015-09-17 16:25:15 -04:00
'use strict';
var meta = require('../../meta');
var soundsController = {};
soundsController.get = function(req, res, next) {
meta.sounds.getFiles(function(err, sounds) {
2016-08-16 19:46:59 +02:00
if (err) {
return next(err);
}
2015-09-17 16:25:15 -04:00
sounds = Object.keys(sounds).map(function(name) {
return {
name: name
};
});
res.render('admin/general/sounds', {
sounds: sounds
});
});
};
module.exports = soundsController;