mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-31 03:40:16 +01:00
refactor: get rid of noop
This commit is contained in:
@@ -21,15 +21,11 @@ const utils = require('../utils');
|
|||||||
|
|
||||||
const activitypubApi = module.exports;
|
const activitypubApi = module.exports;
|
||||||
|
|
||||||
function noop() {}
|
|
||||||
|
|
||||||
function enabledCheck(next) {
|
function enabledCheck(next) {
|
||||||
return async function (caller, params) {
|
return async function (caller, params) {
|
||||||
if (!meta.config.activitypubEnabled) {
|
if (meta.config.activitypubEnabled) {
|
||||||
return noop;
|
await next(caller, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
await next(caller, params);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user