This commit is contained in:
Shiny Nematoda 2023-04-02 21:44:04 +05:30 committed by vrifox
parent 7f1baf0cc4
commit 17dcd43290
No known key found for this signature in database
GPG key ID: D40098E5B60B2197
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');