Fixed getApi return value
This commit is contained in:
parent
7e3586037d
commit
7c826b7590
1 changed files with 2 additions and 2 deletions
|
|
@ -4,10 +4,10 @@ const API = import.meta.env.VITE_BACKEND
|
||||||
|
|
||||||
export default async (api: string) => {
|
export default async (api: string) => {
|
||||||
try {
|
try {
|
||||||
const fetch = await ofetch(API + api)
|
const fetch = await ofetch(API + api, { parseResponse: JSON.parse })
|
||||||
const result = fetch.result
|
const result = fetch.result
|
||||||
return result
|
return result
|
||||||
} catch {
|
} catch {
|
||||||
return false
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue