actions/auth: don't call deprecated DELETE /api/sign_out

This commit is contained in:
Alex Gleason 2022-06-20 11:27:40 -05:00
parent ea9a02f7d7
commit 6530fcf37b
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 7 deletions

View File

@ -229,9 +229,6 @@ export const logIn = (username: string, password: string) =>
throw error;
});
export const deleteSession = () =>
(dispatch: AppDispatch, getState: () => any) => api(getState).delete('/api/sign_out');
export const logOut = () =>
(dispatch: AppDispatch, getState: () => RootState) => {
const state = getState();
@ -246,10 +243,7 @@ export const logOut = () =>
token: state.auth.getIn(['users', account.url, 'access_token']),
};
return Promise.all([
dispatch(revokeOAuthToken(params)),
dispatch(deleteSession()),
]).finally(() => {
return dispatch(revokeOAuthToken(params)).finally(() => {
dispatch({ type: AUTH_LOGGED_OUT, account, standalone });
return dispatch(snackbar.success(messages.loggedOut));
});