mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 12:43:48 -04:00
troubleshoot
This commit is contained in:
parent
b968fc6f18
commit
c1c5799b18
@ -105,6 +105,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|||||||
};
|
};
|
||||||
const removeToken = async (username: string | null = null): Promise<void> => {
|
const removeToken = async (username: string | null = null): Promise<void> => {
|
||||||
const accounts = await getAccounts();
|
const accounts = await getAccounts();
|
||||||
|
console.log('removeToken', username, accounts, toRaw(store.user), localStorage.getItem('account-tokens'), tokenCookie.value);
|
||||||
|
|
||||||
if (store.user) {
|
if (store.user) {
|
||||||
delete accounts[username || store.user.username];
|
delete accounts[username || store.user.username];
|
||||||
@ -118,7 +119,9 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|||||||
tokenCookie.value = store.token;
|
tokenCookie.value = store.token;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('removeToken, saving', accounts, toRaw(store.user), localStorage.getItem('account-tokens'), tokenCookie.value);
|
||||||
saveAccounts(accounts);
|
saveAccounts(accounts);
|
||||||
|
console.log('removeToken, done', toRaw(store.user), localStorage.getItem('account-tokens'), tokenCookie.value);
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
provide: {
|
provide: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user