leaky-ships/leaky-ships/lib/frontend/getAccessToken.ts
2023-02-14 21:05:19 +01:00

7 lines
177 B
TypeScript

export default function getAccessToken(): Promise<string> {
return fetch("/api/auth", {
method: "GET",
})
.then((res) => res.json())
.then((res) => res.token)
}