From c453616a64a085c2e4d19993b18b5b1357667077 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Sun, 24 May 2020 17:51:06 +0200 Subject: [PATCH] simplify payload and cookie removal --- ffplayout/frontend/store/auth.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ffplayout/frontend/store/auth.js b/ffplayout/frontend/store/auth.js index 9c73d334..a35af101 100644 --- a/ffplayout/frontend/store/auth.js +++ b/ffplayout/frontend/store/auth.js @@ -59,8 +59,7 @@ export const actions = { }, async refreshToken ({ commit, state }) { const payload = { - refresh: state.jwtRefresh, - progress: false + refresh: state.jwtRefresh } await this.$axios.post('auth/token/refresh/', payload) @@ -70,9 +69,7 @@ export const actions = { }) .catch((error) => { if (error.response.status === 401) { - this.$cookies.remove('token') - this.$cookies.remove('refresh') - commit('UPADTE_TOKEN', { token: null, refresh: null }) + commit('REMOVE_TOKEN') commit('UPDATE_IS_LOGIN', false) } })