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
  }
}
