refactor(FE-63): remove debug logging from form submission and movement handlers

This commit is contained in:
rstubryan
2025-10-16 15:47:29 +07:00
parent f5ce898bd2
commit 157dfc75ed
3 changed files with 4 additions and 70 deletions
+4 -1
View File
@@ -14,6 +14,9 @@ export async function httpClient<T, B = unknown>(
(!opts.auth && opts.auth !== 'none' && opts.auth !== 'bearer');
const isBearerAuth = opts.auth === 'bearer' && !!opts.token;
const isFormData =
typeof FormData !== 'undefined' && opts.body instanceof FormData;
const config: AxiosRequestConfig = {
url: path,
method: opts.method ?? 'GET',
@@ -22,7 +25,7 @@ export async function httpClient<T, B = unknown>(
timeout: opts.timeoutMs ?? 10_000,
withCredentials: isCookieAuth && !isBearerAuth,
headers: {
'Content-Type': 'application/json',
...(isFormData ? {} : { 'Content-Type': 'application/json' }),
...(opts.headers ?? {}),
...(isBearerAuth && !isCookieAuth
? { Authorization: `Bearer ${opts.token}` }