diff --git a/backend/public/js/index.js b/backend/public/js/index.js index a25daf8f..715161d6 100644 --- a/backend/public/js/index.js +++ b/backend/public/js/index.js @@ -27461,12 +27461,12 @@ var AdminLogin = function AdminLogin() { }, []); var loginOK = function loginOK(id) { - var admin_token = { + var token = { type: 'admin', id: id, from_login: true }; - localStorage.setItem('admin_token', JSON.stringify(admin_token)); + localStorage.setItem('admin_token', JSON.stringify(token)); if (location.search == '') window.location.href = "/admin/meeting";else window.location.href = location.search.replace('?redirect_to=', ''); }; @@ -30410,6 +30410,7 @@ function AdminSide() { var handleLogout = function handleLogout() { axios.get('/admin/logout').then(function () { + localStorage.removeItem('admin_token'); window.location.href = '/admin/login'; }); }; @@ -31016,13 +31017,13 @@ var ChildLogin = function ChildLogin() { var loginOK = function loginOK() { var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var c_account_token = { + var token = { type: 'c-account', id: id, notice: 0, from_login: true }; - localStorage.setItem('c_account_token', JSON.stringify(c_account_token)); + localStorage.setItem('c-account_token', JSON.stringify(token)); if (location.search == '') window.location.href = "/c-account/meeting";else window.location.href = location.search.replace('?redirect_to=', ''); }; @@ -33469,6 +33470,7 @@ var ChildProfileDetail = function ChildProfileDetail() { var handleLogout = function handleLogout() { axios.get('/c-account/logout').then(function () { + localStorage.removeItem('c-account_token'); window.location.href = '/c-account/login'; }); }; @@ -34573,6 +34575,7 @@ function ChildSide() { var handleLogout = function handleLogout() { axios.get('/c-account/logout').then(function () { + localStorage.removeItem('c-account_token'); window.location.href = '/c-account/login'; }); }; @@ -37559,13 +37562,13 @@ var ParentLogin = function ParentLogin() { }, []); var loginOK = function loginOK(id) { - var p_account_token = { + var token = { type: 'p-account', id: id, notice: 0, from_login: true }; - localStorage.setItem('p_account_token', JSON.stringify(p_account_token)); + localStorage.setItem('p-account_token', JSON.stringify(token)); if (location.search == '') window.location.href = "/p-account/meeting";else window.location.href = location.search.replace('?redirect_to=', ''); }; @@ -42705,6 +42708,7 @@ var ParentProfileDetail = function ParentProfileDetail() { var handleLogout = function handleLogout() { axios.get('/p-account/logout').then(function () { + localStorage.removeItem('p-account_token'); window.location.href = '/p-account/login'; }); }; @@ -43921,6 +43925,7 @@ function ParentSide() { var handleLogout = function handleLogout() { axios.get('/p-account/logout').then(function () { + localStorage.removeItem('p-account_token'); window.location.href = '/p-account/login'; }); }; diff --git a/backend/resources/js/admin/login/index.jsx b/backend/resources/js/admin/login/index.jsx index ccbe72f0..1d3b5e59 100644 --- a/backend/resources/js/admin/login/index.jsx +++ b/backend/resources/js/admin/login/index.jsx @@ -41,12 +41,12 @@ const AdminLogin = () => { const loginOK = (id) => { - let admin_token = { + let token = { type: 'admin', id: id, from_login: true }; - localStorage.setItem('admin_token', JSON.stringify(admin_token)); + localStorage.setItem('admin_token', JSON.stringify(token)); if(location.search == '') window.location.href = "/admin/meeting"; diff --git a/backend/resources/js/admin/side.jsx b/backend/resources/js/admin/side.jsx index 506e3e06..4476adb4 100644 --- a/backend/resources/js/admin/side.jsx +++ b/backend/resources/js/admin/side.jsx @@ -7,6 +7,7 @@ export default function AdminSide() { const handleLogout = () => { axios.get('/admin/logout') .then(() => { + localStorage.removeItem('admin_token'); window.location.href = '/admin/login'; }) } diff --git a/backend/resources/js/child/auth/login/index.jsx b/backend/resources/js/child/auth/login/index.jsx index 5649f855..60f8d868 100644 --- a/backend/resources/js/child/auth/login/index.jsx +++ b/backend/resources/js/child/auth/login/index.jsx @@ -40,13 +40,13 @@ const ChildLogin = () => { const loginOK = (id = 0) =>{ - let c_account_token = { + let token = { type: 'c-account', id: id, notice: 0, from_login: true }; - localStorage.setItem('c_account_token', JSON.stringify(c_account_token)); + localStorage.setItem('c-account_token', JSON.stringify(token)); if(location.search == '') window.location.href = "/c-account/meeting"; diff --git a/backend/resources/js/child/profile/index.jsx b/backend/resources/js/child/profile/index.jsx index df2b03af..cfbfa2c3 100644 --- a/backend/resources/js/child/profile/index.jsx +++ b/backend/resources/js/child/profile/index.jsx @@ -68,6 +68,7 @@ const ChildProfileDetail = () => { const handleLogout = () => { axios.get('/c-account/logout') .then(() => { + localStorage.removeItem('c-account_token'); window.location.href = '/c-account/login'; }) } diff --git a/backend/resources/js/child/side.jsx b/backend/resources/js/child/side.jsx index 44759ce9..7c63b4c3 100644 --- a/backend/resources/js/child/side.jsx +++ b/backend/resources/js/child/side.jsx @@ -9,6 +9,7 @@ export default function ChildSide() { const handleLogout = () => { axios.get('/c-account/logout') .then(() => { + localStorage.removeItem('c-account_token'); window.location.href = '/c-account/login'; }) } diff --git a/backend/resources/js/parent/auth/login/index.jsx b/backend/resources/js/parent/auth/login/index.jsx index d5133b88..05ae38b2 100644 --- a/backend/resources/js/parent/auth/login/index.jsx +++ b/backend/resources/js/parent/auth/login/index.jsx @@ -42,13 +42,13 @@ const ParentLogin = () => { const loginOK = (id) =>{ - let p_account_token = { + let token = { type: 'p-account', id: id, notice: 0, from_login: true }; - localStorage.setItem('p_account_token', JSON.stringify(p_account_token)); + localStorage.setItem('p-account_token', JSON.stringify(token)); if(location.search == '') window.location.href = "/p-account/meeting"; diff --git a/backend/resources/js/parent/profile/index.jsx b/backend/resources/js/parent/profile/index.jsx index a6133da7..1bf720b8 100644 --- a/backend/resources/js/parent/profile/index.jsx +++ b/backend/resources/js/parent/profile/index.jsx @@ -67,6 +67,7 @@ const ParentProfileDetail = () => { const handleLogout = () => { axios.get('/p-account/logout') .then(() => { + localStorage.removeItem('p-account_token'); window.location.href = '/p-account/login'; }) } diff --git a/backend/resources/js/parent/side.jsx b/backend/resources/js/parent/side.jsx index 6b244b4a..ccc84652 100644 --- a/backend/resources/js/parent/side.jsx +++ b/backend/resources/js/parent/side.jsx @@ -9,6 +9,7 @@ export default function ParentSide() { const handleLogout = () => { axios.get('/p-account/logout') .then(() => { + localStorage.removeItem('p-account_token'); window.location.href = '/p-account/login'; }) }