account migration
This commit is contained in:
parent
661082303d
commit
ce1b3f9188
|
@ -44,9 +44,8 @@ export async function signout() {
|
||||||
else location.href = '/';
|
else location.href = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getAccounts() {
|
export async function getAccounts(): Promise<{ id: Account['id'], token: Account['token'] }[]> {
|
||||||
const accounts: { id: Account['id'], token: Account['token'] }[] = (await get('accounts')) || [];
|
return (await get('accounts')) || [];
|
||||||
return accounts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addAccount(id: Account['id'], token: Account['token']) {
|
export async function addAccount(id: Account['id'], token: Account['token']) {
|
||||||
|
|
|
@ -38,6 +38,11 @@ if (localStorage.getItem('vuex') != null) {
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (localStorage.getItem('accounts') != null) {
|
||||||
|
set('accounts', JSON.parse(localStorage.getItem('accounts')));
|
||||||
|
localStorage.removeItem('accounts');
|
||||||
|
}
|
||||||
|
|
||||||
import * as Sentry from '@sentry/browser';
|
import * as Sentry from '@sentry/browser';
|
||||||
import { Integrations } from '@sentry/tracing';
|
import { Integrations } from '@sentry/tracing';
|
||||||
import { createApp, toRaw, watch } from 'vue';
|
import { createApp, toRaw, watch } from 'vue';
|
||||||
|
|
Loading…
Reference in New Issue