frontend/composables/Account.ts
2024-04-25 19:54:02 -10:00

13 lines
241 B
TypeScript

import type { Mastodon } from "megalodon";
export const useAccount = async (
client: Mastodon | null,
accountId: string,
) => {
if (!client) {
return null;
}
return (await client.getAccount(accountId)).data;
};