import { API_PREFIX, HTTP_SCHEME, PREF } from "./const"; export async function checkCode(code: string) { const res = await fetch(`${HTTP_SCHEME}://${API_PREFIX}/codes?code=${code}`, { "method": "GET", "cache": "no-cache" }); if (!res.ok) { return null; } return await res.json(); }