7 lines
177 B
TypeScript
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)
|
|
}
|