2023-07-27 07:31:52 +02:00
|
|
|
/*
|
2024-02-13 16:59:27 +01:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 07:31:52 +02:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-09-19 09:37:43 +02:00
|
|
|
import { get } from '@/scripts/idb-proxy.js';
|
2021-08-20 12:38:16 +02: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 07:19:15 +02:00
|
|
|
return accounts.find(account => account.id === id);
|
2021-08-20 12:38:16 +02:00
|
|
|
}
|