Merge branch 'login-fail-throw' into 'develop'
logIn: rethrow 403 for non-waitlisted account See merge request soapbox-pub/soapbox-fe!1617
This commit is contained in:
commit
79b11fefde
2 changed files with 3 additions and 3 deletions
|
@ -180,8 +180,8 @@ export const verifyCredentials = (token: string, accountUrl?: string) => {
|
||||||
return account;
|
return account;
|
||||||
} else {
|
} else {
|
||||||
if (getState().me === null) dispatch(fetchMeFail(error));
|
if (getState().me === null) dispatch(fetchMeFail(error));
|
||||||
dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error, skipAlert: true });
|
dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error });
|
||||||
return error;
|
throw error;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('<Registration />', () => {
|
||||||
mock.onPost('/api/v1/pepe/accounts').reply(200, {});
|
mock.onPost('/api/v1/pepe/accounts').reply(200, {});
|
||||||
mock.onPost('/api/v1/apps').reply(200, {});
|
mock.onPost('/api/v1/apps').reply(200, {});
|
||||||
mock.onPost('/oauth/token').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, {});
|
mock.onGet('/api/v1/instance').reply(200, {});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue