From 10abd20260050174dd508038f0b95c5f8f740933 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 19 Nov 2021 09:57:58 +0100 Subject: fix bugs --- src/services/AuthService.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/services/AuthService.js') diff --git a/src/services/AuthService.js b/src/services/AuthService.js index ff1e468..758157c 100644 --- a/src/services/AuthService.js +++ b/src/services/AuthService.js @@ -5,6 +5,7 @@ const url = 'http://localhost:8000/api/auth/' const error_notify = (error) => { for (const [key, values] of Object.entries(error.response.data)) { + console.log(values) values.forEach(value => { Vue.notify({ type: 'error', @@ -43,5 +44,16 @@ export default { }) .catch(error => error_notify(error)) + }, + + async logout() { + return await axios + .post(url+'logout/') + .then(res => { + return { + status: res.status + } + }) + .catch(error => error_notify(error)) } } \ No newline at end of file -- cgit v1.2.3