2021-11-12 02:02:25 +09:00
|
|
|
import { get } from '@/scripts/idb-proxy';
|
2021-08-20 19:38:16 +09:00
|
|
|
|
|
|
|
export async function getAccountFromId(id: string) {
|
|
|
|
const accounts = await get('accounts') as { token: string; id: string; }[];
|
|
|
|
if (!accounts) console.log('Accounts are not recorded');
|
2022-05-07 14:19:15 +09:00
|
|
|
return accounts.find(account => account.id === id);
|
2021-08-20 19:38:16 +09:00
|
|
|
}
|