mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 08:23:08 +02:00
7 lines
287 B
TypeScript
7 lines
287 B
TypeScript
import { get } from '@/scripts/idb-proxy';
|
|
|
|
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(account => account.id === id);
|
|
}
|