From 458ee4c17009a6b129c1ddde74a8dce549e64e83 Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:09:57 +0930 Subject: [PATCH] Do not return apis when enabled=false. As APIs are currently registered at server start, they are effectively always enabled. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5a1295abf..6adba586a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -132,7 +132,7 @@ class Server { // feature detection app.getFeatures = async (enabled?: boolean) => { return { - apis: app.apis, + apis: enabled === false ? [] : app.apis, plugins: await app.getPluginsList(enabled) } }