From eaf435413ef904bb0aecf77965466512386fed01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 6 Jun 2024 21:10:24 -0400 Subject: [PATCH] refactor: get rid of noop --- src/api/activitypub.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/api/activitypub.js b/src/api/activitypub.js index b14a2e4f44..cf06c7a3fe 100644 --- a/src/api/activitypub.js +++ b/src/api/activitypub.js @@ -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); }; }