This commit is contained in:
Shiny Nematoda 2023-04-02 21:44:04 +05:30
parent 2e2f6b78f9
commit 08da12fa67
No known key found for this signature in database
GPG key ID: 367DA4C64DF057AD
6 changed files with 65 additions and 44 deletions

View file

@ -15,6 +15,7 @@ import {
} from '@/scripts/db.js';
import {
useAuthLogout,
useAuthCreatePlaylist,
getAuthPlaylists,
getJsonAuth,
@ -134,9 +135,7 @@ const Open = async key => {
});
}
}
} else {
useCreatePlaylist(i.name, i.urls);
}
} else useCreatePlaylist(i.name, i.urls);
List();
}
@ -206,12 +205,7 @@ const Login = async () => {
}
},
Logout = async () => {
const res = await getJsonAuth('/logout', {
method: 'POST',
headers: {
Authorization: store.auth,
},
});
const res = await useAuthLogout();
if (!res.error) {
store.removeItem('auth');