upgrade axios

This commit is contained in:
Proddy
2022-10-07 20:26:17 +02:00
parent c90be99216
commit 5faffc3886
23 changed files with 116 additions and 109 deletions

View File

@@ -28,7 +28,7 @@ const Authentication: FC<RequiredChildrenProps> = ({ children }) => {
const decodedMe = AuthenticationApi.decodeMeJWT(accessToken);
setMe(decodedMe);
enqueueSnackbar(LL.LOGGED_IN({ name: decodedMe.username }), { variant: 'success' });
} catch (error: unknown) {
} catch (error) {
setMe(undefined);
throw new Error('Failed to parse JWT');
}
@@ -54,7 +54,7 @@ const Authentication: FC<RequiredChildrenProps> = ({ children }) => {
await AuthenticationApi.verifyAuthorization();
setMe(AuthenticationApi.decodeMeJWT(accessToken));
setInitialized(true);
} catch (error: unknown) {
} catch (error) {
setMe(undefined);
setInitialized(true);
}