mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 16:23:10 +02:00
12 lines
405 B
TypeScript
12 lines
405 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
* 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);
|
|
}
|