Changed name of functions
This commit is contained in:
parent
31cdf2a688
commit
9ffae4ed03
2 changed files with 0 additions and 0 deletions
13
src/utils/functions/getApi.ts
Normal file
13
src/utils/functions/getApi.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { ofetch } from 'ofetch'
|
||||
|
||||
const API = import.meta.env.VITE_BACKEND
|
||||
|
||||
export default async (api: string) => {
|
||||
try {
|
||||
const fetch = await ofetch(API + api)
|
||||
const result = fetch.result
|
||||
return result
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue