Skip to content

Commit

Permalink
Fix login issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud-Emad committed Jan 29, 2024
1 parent 4b8fb3d commit 6b21d89
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions client/src/clients/api/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@ export abstract class ApiClientBase {
if (access_token && refresh_token && !isValidToken(access_token) && isValidToken(refresh_token)) {
await ApiClientBase.$api.auth.refresh({ refresh: refresh_token })
}
if (err && !ApiClientBase.USER && access_token !== null && refresh_token !== null) {
const user = await ApiClientBase.$api.myprofile.getUser();
ApiClientBase.USER = {...user, access_token, refresh_token}
}

if (err) {

options.disableNotify !== true && ApiClientBase.$notifier?.notify({
type: 'error',
description: options.normalizeError?.(err, res) ?? ApiClientBase.normalizeError(err) ?? err
})

panic(err)
}

if (
(res.config.method === 'post' || res.config.method === 'put') &&
Expand Down

0 comments on commit 6b21d89

Please sign in to comment.