From b64ea43d2052d22a3e6f37647b7da3d231d1023b Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 10 Jul 2023 13:38:38 +0200 Subject: [PATCH] System logs only for self hosted --- packages/worker/src/api/routes/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/worker/src/api/routes/index.ts b/packages/worker/src/api/routes/index.ts index 31e93c45cc..cbd6c96558 100644 --- a/packages/worker/src/api/routes/index.ts +++ b/packages/worker/src/api/routes/index.ts @@ -18,6 +18,8 @@ import accountRoutes from "./system/accounts" import restoreRoutes from "./system/restore" import systemLogRoutes from "./system/logs" +import env from "../../environment" + export const routes: Router[] = [ configRoutes, userRoutes, @@ -38,5 +40,8 @@ export const routes: Router[] = [ restoreRoutes, eventRoutes, pro.scim, - systemLogRoutes, ] + +if (env.SELF_HOSTED) { + routes.push(systemLogRoutes) +}