use logout link of index resource

This commit is contained in:
Maren Süwer
2018-10-11 08:27:24 +02:00
parent eb65ef1e65
commit 6562071bfe
3 changed files with 12 additions and 8 deletions

View File

@@ -180,11 +180,11 @@ export const fetchMe = () => {
};
};
export const logout = () => {
export const logout = (link: string) => {
return function(dispatch: any) {
dispatch(logoutPending());
return apiClient
.delete(LOGIN_URL)
.delete(link)
.then(() => {
dispatch(logoutSuccess());
})