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