fix ApiResponse on success

This commit is contained in:
Fran Jurmanović
2025-09-14 21:44:54 +02:00
parent 4bc74f26d1
commit b7999b02e8

View File

@@ -36,7 +36,7 @@ export async function fetchServerAPI<T>(
}
if (response.headers.get('Content-Type')?.includes('application/json')) {
return await response.json();
return { data: await response.json() };
}
return { message: await response.text() };