feat: bundle frontend with API executable

This commit is contained in:
Sam 2022-06-17 00:00:52 +02:00
parent 57c7a0f4de
commit 6c9ebf1d08
13 changed files with 105 additions and 16 deletions

View file

@ -15,7 +15,10 @@ async function getCurrentUser() {
try {
return await fetchAPI<MeUser>("/users/@me");
} catch (e) {
if ((e as APIError).code === ErrorCode.Forbidden) {
if (
(e as APIError).code === ErrorCode.Forbidden ||
(e as APIError).code === ErrorCode.InvalidToken
) {
localStorage.removeItem("pronouns-token");
}