clean routes

This commit is contained in:
2026-01-03 02:42:47 +01:00
parent 07985fb8f1
commit 2f21dc4595
107 changed files with 7596 additions and 3401 deletions

View File

@@ -427,9 +427,9 @@ export class ApiRequestLogger {
/**
* Create a logged fetch function
*/
createLoggedFetch(): typeof window.fetch {
createLoggedFetch(): typeof fetch {
const logger = this;
const originalFetch = window.fetch;
const originalFetch = typeof window !== 'undefined' ? window.fetch : fetch;
return async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {
const startTime = performance.now();
@@ -507,7 +507,7 @@ export function initializeApiLogger(options?: ApiRequestLoggerOptions): ApiReque
/**
* Fetch interceptor that automatically logs all requests
*/
export function createLoggedFetch(originalFetch: typeof window.fetch = window.fetch): typeof window.fetch {
export function createLoggedFetch(originalFetch: typeof fetch = typeof window !== 'undefined' ? window.fetch : fetch): typeof fetch {
const logger = getGlobalApiLogger();
return async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {