2021-11-11 17:02:25 +00:00
|
|
|
import { get } from '@/scripts/idb-proxy';
|
2021-08-20 10:38:16 +00: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');
|
|
|
|
return accounts.find(e => e.id === id);
|
|
|
|
}
|