Fixed getApi return value

This commit is contained in:
Patrick Alvin Alcala 2025-11-05 10:39:21 +08:00
parent 7e3586037d
commit 7c826b7590

View file

@ -4,10 +4,10 @@ const API = import.meta.env.VITE_BACKEND
export default async (api: string) => {
try {
const fetch = await ofetch(API + api)
const fetch = await ofetch(API + api, { parseResponse: JSON.parse })
const result = fetch.result
return result
} catch {
return false
return []
}
}