Don't call verify_credentials twice when an account fails
This commit is contained in:
@@ -178,8 +178,7 @@ export const rememberAuthAccount = (accountUrl: string) =>
|
||||
|
||||
export const loadCredentials = (token: string, accountUrl: string) =>
|
||||
(dispatch: AppDispatch) => dispatch(rememberAuthAccount(accountUrl))
|
||||
.then(() => dispatch(verifyCredentials(token, accountUrl)))
|
||||
.catch(() => dispatch(verifyCredentials(token, accountUrl)));
|
||||
.finally(() => dispatch(verifyCredentials(token, accountUrl)));
|
||||
|
||||
export const logIn = (username: string, password: string) =>
|
||||
(dispatch: AppDispatch) => dispatch(getAuthApp()).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user