blob: 40afa10f2dca749dc955b559e038a379e8425e70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { get } from '@/scripts/idb-proxy.js';
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(account => account.id === id);
}
|