[Dev] Remove logging for api requests outside of dev (#4804)

This commit is contained in:
Moka 2024-11-08 00:30:49 +01:00 committed by GitHub
parent b2fdb9fcd1
commit 2b91d9d259
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

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