Fix admin product image handling and clarify support phone settings.

This commit is contained in:
2026-09-16 20:04:12 +03:30
parent 2de2f697f1
commit ab5ce96529
6 changed files with 71 additions and 17 deletions
+2 -1
View File
@@ -30,6 +30,7 @@ type RequestOptions = {
body?: unknown
auth?: boolean
query?: Record<string, string | number | boolean | undefined | null>
timeoutMs?: number
}
function buildUrl(path: string, query?: RequestOptions['query']): string {
@@ -86,7 +87,7 @@ export async function apiRequest<T>(path: string, options: RequestOptions = {}):
method: options.method ?? (options.body !== undefined ? 'POST' : 'GET'),
headers,
body: options.body !== undefined ? JSON.stringify(options.body) : undefined,
signal: AbortSignal.timeout(20_000),
signal: AbortSignal.timeout(options.timeoutMs ?? 20_000),
})
} catch (err) {
const timedOut =