From a2c1f385c1dc368e573da8b8a94ca79564e609f7 Mon Sep 17 00:00:00 2001 From: E44 <129310925+programmer-44@users.noreply.github.com> Date: Sun, 4 Jan 2026 23:01:10 +0100 Subject: [PATCH] refactor(control): undo last commit --- control/frontend/src/lib/ts/api_handler.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/control/frontend/src/lib/ts/api_handler.ts b/control/frontend/src/lib/ts/api_handler.ts index 0ea1573..3e33aa7 100755 --- a/control/frontend/src/lib/ts/api_handler.ts +++ b/control/frontend/src/lib/ts/api_handler.ts @@ -209,6 +209,9 @@ async function request( ): Promise { try { const cache_buster = `${url.includes('?') ? '&' : '?'}=${Date.now()}`; + if (dev) { + console.debug('Sending request: ', url + cache_buster, 'with', options.body ?? 'none'); + } const response = await fetch(url + cache_buster, options); if (response.ok || supress_error_handling_http_codes.includes(response.status)) { const contentType = response.headers.get('content-type') || ''; @@ -219,6 +222,9 @@ async function request( } else { const json: Record = await response.json(); request_response = { ok: response.ok, http_code: response.status, json: json }; + if (dev) { + console.debug(request_response); + } } return request_response; }