Elias Entrup
Update for OpenAlex change
951bd56
Raw History Blame Contribute Delete
244 Bytes
const API_BASE = import.meta.env.VITE_API_BASE ?? ''
export async function apiGet (path) {
const res = await fetch(API_BASE + path)
if (!res.ok) {
throw new Error(`API error ${res.status}: ${res.statusText}`)
}
return res.json()
}