This commit is contained in:
tamaina
2021-02-15 06:17:21 +09:00
parent bf1db27824
commit 1ae1385d43
6 changed files with 51 additions and 55 deletions

View File

@@ -1,7 +1,7 @@
import { get } from 'idb-keyval';
export async function getAccountFromId(id: string) {
const accounts = await get('accounts') as { token: string; id: string; }[];
if (!accounts) console.log('Accounts are not recorded');
return accounts.find(e => e.id === id)
const accounts = await get('accounts') as { token: string; id: string; }[];
if (!accounts) console.log('Accounts are not recorded');
return accounts.find(e => e.id === id);
}