kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'login-fail-throw' into 'develop'
logIn: rethrow 403 for non-waitlisted account See merge request soapbox-pub/soapbox-fe!1617environments/review-develop-3zknud/deployments/504
commit
79b11fefde
|
@ -180,8 +180,8 @@ export const verifyCredentials = (token: string, accountUrl?: string) => {
|
|||
return account;
|
||||
} else {
|
||||
if (getState().me === null) dispatch(fetchMeFail(error));
|
||||
dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error, skipAlert: true });
|
||||
return error;
|
||||
dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error });
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ describe('<Registration />', () => {
|
|||
mock.onPost('/api/v1/pepe/accounts').reply(200, {});
|
||||
mock.onPost('/api/v1/apps').reply(200, {});
|
||||
mock.onPost('/oauth/token').reply(200, {});
|
||||
mock.onPost('/api/v1/accounts/verify_credentials').reply(200, {});
|
||||
mock.onGet('/api/v1/accounts/verify_credentials').reply(200, { id: '123' });
|
||||
mock.onGet('/api/v1/instance').reply(200, {});
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue