refactor: get rid of noop

This commit is contained in:
Barış Soner Uşaklı
2024-06-06 21:10:24 -04:00
parent 35eb2d0d46
commit eaf435413e

View File

@@ -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);
};
}