Minimal Viable Product + Refactor to pinia store + Fix PDF export
This commit is contained in:
@@ -26,9 +26,13 @@ export async function httpApi<T>(url: string, options?: RequestInit, useFetchOpt
|
||||
...options,
|
||||
},
|
||||
useFetchOptions
|
||||
).json();
|
||||
);
|
||||
|
||||
if (!error.value && data.value) {
|
||||
if (data.value) {
|
||||
data.value = JSON.parse(data.value as string) as T;
|
||||
}
|
||||
|
||||
if (!error.value) {
|
||||
return { data: data.value, error: null };
|
||||
} else {
|
||||
return { data: data.value, error: error.value };
|
||||
|
||||
Reference in New Issue
Block a user