0
0
Fork 0

Refactor <HashtagHeader> to TypeScript (#33096)

This commit is contained in:
Eugen Rochko 2024-12-06 09:42:24 +01:00 committed by GitHub
parent a1143c522b
commit 25387dc423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 238 additions and 237 deletions

View file

@ -0,0 +1,11 @@
import { apiRequestPost, apiRequestGet } from 'mastodon/api';
import type { ApiHashtagJSON } from 'mastodon/api_types/tags';
export const apiGetTag = (tagId: string) =>
apiRequestGet<ApiHashtagJSON>(`v1/tags/${tagId}`);
export const apiFollowTag = (tagId: string) =>
apiRequestPost<ApiHashtagJSON>(`v1/tags/${tagId}/follow`);
export const apiUnfollowTag = (tagId: string) =>
apiRequestPost<ApiHashtagJSON>(`v1/tags/${tagId}/unfollow`);