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