This commit is contained in:
parent
cbf885d05a
commit
8ada2d78ed
|
@ -53,7 +53,7 @@ export async function getAccounts(): Promise<{ id: Account['id'], token: Account
|
||||||
export async function addAccount(id: Account['id'], token: Account['token']) {
|
export async function addAccount(id: Account['id'], token: Account['token']) {
|
||||||
const accounts = await getAccounts();
|
const accounts = await getAccounts();
|
||||||
if (!accounts.some(x => x.id === id)) {
|
if (!accounts.some(x => x.id === id)) {
|
||||||
return set('accounts', accounts.concat([{ id, token }]));
|
await set('accounts', accounts.concat([{ id, token }]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue