import { apiBase } from '~/helpers'; export default async function (path: string, method = 'GET', body = null) { const headers = new Headers(); headers.append("Content-Type", "application/json"); return await $fetch(`${apiBase}/${path}`, { method, headers, body }) }