2023-07-27 00:31:52 -05:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2021-11-11 11:02:25 -06:00
|
|
|
import { get } from '@/scripts/idb-proxy';
|
2021-08-20 05:38:16 -05: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 00:19:15 -05:00
|
|
|
return accounts.find(account => account.id === id);
|
2021-08-20 05:38:16 -05:00
|
|
|
}
|