2023-01-13 05:40:33 +01:00
|
|
|
import { get } from "@/scripts/idb-proxy";
|
2021-08-20 12:38:16 +02:00
|
|
|
|
|
|
|
export async function getAccountFromId(id: string) {
|
2023-01-13 05:40:33 +01:00
|
|
|
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);
|
2021-08-20 12:38:16 +02:00
|
|
|
}
|