tutu/src/masto/acct.ts

10 lines
311 B
TypeScript

import { Accessor, createResource } from "solid-js";
import type { mastodon } from "masto";
export function useAcctProfile(client: Accessor<mastodon.rest.Client>) {
return createResource(client, (client) => {
return client.v1.accounts.verifyCredentials()
}, {
name: "MastodonAccountProfile"
})
}