Frontend: updated logout.
parent
d875ce398f
commit
c826b6b5db
18
logout.js
18
logout.js
|
@ -20,13 +20,13 @@ async function logout() {
|
|||
loggedIn()
|
||||
}
|
||||
|
||||
// // IF THERE IS A TOKEN BUT NO USERNAME LOGOUT
|
||||
// if (allCookies !== '' && myStorage.length === 0) {
|
||||
// logout()
|
||||
// }
|
||||
// IF THERE IS A TOKEN BUT NO USERNAME LOGOUT
|
||||
if (allCookies !== '' && myStorage.length === 0) {
|
||||
logout()
|
||||
}
|
||||
|
||||
// // IF THERE IS NO COOKIE BUT A USERNAME GET RID OF USERNAME LOCALLY.
|
||||
// if (allCookies === '' && myStorage.length !== 0) {
|
||||
// localStorage.removeItem('username')
|
||||
// document.querySelector("#loggeduser").innerHTML = 'You are not logged in'
|
||||
// }
|
||||
// IF THERE IS NO COOKIE BUT A USERNAME GET RID OF USERNAME LOCALLY.
|
||||
if (allCookies === '' && myStorage.length !== 0) {
|
||||
localStorage.removeItem('username')
|
||||
document.querySelector("#loggeduser").innerHTML = 'You are not logged in'
|
||||
}
|
Loading…
Reference in New Issue