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

14 lines
277 B
TypeScript

import type { Mastodon } from "megalodon";
export const useAccountSearch = async (client: Mastodon | null, q: string) => {
if (!client) {
return null;
}
return (
await client.searchAccount(q, {
resolve: true,
})
).data;
};