tutu/src/masto/acct.ts

11 lines
311 B
TypeScript
Raw Normal View History

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