frontend/composables/AccountSearch.ts

14 lines
277 B
TypeScript
Raw Normal View History

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;
};