[dev] log api requests in dev

This commit is contained in:
Moka 2024-11-06 21:07:14 +01:00
parent e2402b0d87
commit 2e4cddccf6

View File

@ -69,6 +69,10 @@ export abstract class ApiBase {
"Content-Type": config.headers?.["Content-Type"] ?? "application/json",
};
if (import.meta.env.DEV) {
console.log(`Sending ${config.method ?? "GET"} request to: `, this.base + path, config);
}
return await fetch(this.base + path, config);
}