From 2b91d9d259516aa33a0a143888ce80c9e2bf30c9 Mon Sep 17 00:00:00 2001 From: Moka <54149968+MokaStitcher@users.noreply.github.com> Date: Fri, 8 Nov 2024 00:30:49 +0100 Subject: [PATCH] [Dev] Remove logging for api requests outside of dev (#4804) --- src/plugins/api/api-base.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/api/api-base.ts b/src/plugins/api/api-base.ts index 0740de4e675..5c1a30ff3ab 100644 --- a/src/plugins/api/api-base.ts +++ b/src/plugins/api/api-base.ts @@ -69,7 +69,9 @@ export abstract class ApiBase { "Content-Type": config.headers?.["Content-Type"] ?? "application/json", }; - console.log(`Sending ${config.method ?? "GET"} request to: `, this.base + path, config); + if (import.meta.env.DEV) { + console.log(`Sending ${config.method ?? "GET"} request to: `, this.base + path, config); + } return await fetch(this.base + path, config); }