mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 04:59:06 +01:00
8 lines
281 B
TypeScript
8 lines
281 B
TypeScript
|
import { get } from '@client/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(e => e.id === id);
|
||
|
}
|