Skip to content

Node.js based forum software built for the modern web

filter:templates.get_config, allows you to modify template config

psychobunnyd4dc716acd27
diff --git a/src/routes/api.js b/src/routes/api.js
index e080df9277..e152715beb 100644
--- a/src/routes/api.js
+++ b/src/routes/api.js
@@ -150,7 +150,10 @@ function getTemplatesListing(req, res, next) {
plugins.fireHook('filter:templates.get_virtual', [], next);
},
config: function(next) {
- fs.readFile(path.join(nconf.get('views_dir'), 'config.json'), next);
+ fs.readFile(path.join(nconf.get('views_dir'), 'config.json'), function(err, config) {
+ config = JSON.parse(config.toString());
+ plugins.fireHook('filter:templates.get_config', config, next);
+ });
},
}, function(err, results) {
if (err) {