Skip to content

Node.js based forum software built for the modern web

filter:config.get

psychobunnyc97c1ab4b936
diff --git a/src/controllers/api.js b/src/controllers/api.js
index 263d1b3a4e..78e8fe2c75 100644
--- a/src/controllers/api.js
+++ b/src/controllers/api.js
@@ -86,11 +86,13 @@ apiController.getConfig = function(req, res, next) {
config.categoryTopicSort = settings.categoryTopicSort || config.categoryTopicSort;
config.topicSearchEnabled = settings.topicSearchEnabled || false;
- if (res.locals.isAPI) {
- res.status(200).json(config);
- } else {
- next(err, config);
- }
+ plugins.fireHook('filter:config.get', config, function(err, config) {
+ if (res.locals.isAPI) {
+ res.status(200).json(config);
+ } else {
+ next(err, config);
+ }
+ });
});
};