feat: prettier integration
This commit is contained in:
@ -13,7 +13,7 @@ export const codeApi = async (accessToken: string, nonce: string) => {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (response.status !== 200 && response.status !== 201)
|
||||
|
@ -28,7 +28,7 @@ const processRefreshQueue = async (token: string | null) => {
|
||||
|
||||
const refreshToken = async (
|
||||
accountId: string,
|
||||
refreshToken: string
|
||||
refreshToken: string,
|
||||
): Promise<{ access: string; refresh: string }> => {
|
||||
const db = useDbStore.getState().db;
|
||||
const loadAccounts = useAuth.getState().loadAccounts;
|
||||
@ -79,7 +79,7 @@ axios.interceptors.request.use(
|
||||
try {
|
||||
const { access } = await refreshToken(
|
||||
account!.accountId,
|
||||
account!.refresh
|
||||
account!.refresh,
|
||||
);
|
||||
token = access;
|
||||
} catch (err) {
|
||||
@ -97,7 +97,7 @@ axios.interceptors.request.use(
|
||||
request.headers["Authorization"] = `Bearer ${token}`;
|
||||
return request;
|
||||
},
|
||||
(error) => Promise.reject(error)
|
||||
(error) => Promise.reject(error),
|
||||
);
|
||||
|
||||
export const handleApiError = async (response: AxiosResponse) => {
|
||||
|
@ -15,7 +15,7 @@ export const refreshTokenApi = async (refreshToken: string) => {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${refreshToken}`,
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (response.status !== 200 && response.status !== 201)
|
||||
|
Reference in New Issue
Block a user