Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update WebApiService.ts (#541)

Leendert de Borstc1ec6cb95d3c
diff --git a/browser-extensions/chrome/src/utils/WebApiService.ts b/browser-extensions/chrome/src/utils/WebApiService.ts
index 0b56214bf..27d035ca7 100644
--- a/browser-extensions/chrome/src/utils/WebApiService.ts
+++ b/browser-extensions/chrome/src/utils/WebApiService.ts
@@ -1,9 +1,9 @@
type RequestInit = globalThis.RequestInit;
/**
- * Interface for the token response from the API.
+ * Type for the token response from the API.
*/
-interface ITokenResponse {
+type TokenResponse = {
token: string;
refreshToken: string;
}
@@ -122,7 +122,7 @@ export class WebApiService {
throw new Error('Failed to refresh token');
}
- const tokenResponse: ITokenResponse = await response.json();
+ const tokenResponse: TokenResponse = await response.json();
this.updateTokens(tokenResponse.token, tokenResponse.refreshToken);
return tokenResponse.token;
} catch {