mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
Topic await errors (#7727)
* feat: derp await * feat: restore user.getSettings * feat: cleanup * feat: make tid const * feat: cleanup * fix: tests * feat: deprecate filter:controllers.topic.get * feat: rewrite post-index logic * feat: change calculation to match others * fix: use .async * feat: remove try/catch wrapper
This commit is contained in:
committed by
GitHub
parent
5e46cf9b09
commit
bd640a1107
@@ -6,7 +6,7 @@ const utils = require('../utils');
|
||||
|
||||
module.exports = function (Plugins) {
|
||||
Plugins.deprecatedHooks = {
|
||||
|
||||
'filter:controllers.topic.get': 'filter:topic.build',
|
||||
};
|
||||
|
||||
Plugins.internals = {
|
||||
@@ -34,7 +34,7 @@ module.exports = function (Plugins) {
|
||||
|
||||
var method;
|
||||
|
||||
if (Object.keys(Plugins.deprecatedHooks).includes(data.hook)) {
|
||||
if (Plugins.deprecatedHooks[data.hook]) {
|
||||
winston.warn('[plugins/' + id + '] Hook `' + data.hook + '` is deprecated, ' +
|
||||
(Plugins.deprecatedHooks[data.hook] ?
|
||||
'please use `' + Plugins.deprecatedHooks[data.hook] + '` instead.' :
|
||||
|
||||
Reference in New Issue
Block a user