Profile editing: Featured tags (#37952)

This commit is contained in:
Echo authored and GitHub committed 2026-02-23 15:53:49 +00:00
1 parent e2aecd040c
commit ef6405ab28
17 files changed
+869 -115

No files matched your search

+18 -3
View File
@@ -1,10 +1,13 @@
import { apiRequestPost, apiRequestGet } from 'mastodon/api';
import { apiRequestPost, apiRequestGet, apiRequestDelete } from 'mastodon/api';
import type {
ApiAccountJSON,
ApiFamiliarFollowersJSON,
} from 'mastodon/api_types/accounts';
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships';
import type { ApiHashtagJSON } from 'mastodon/api_types/tags';
import type {
ApiFeaturedTagJSON,
ApiHashtagJSON,
} from 'mastodon/api_types/tags';
export const apiSubmitAccountNote = (id: string, value: string) =>
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/note`, {
@@ -30,7 +33,19 @@ export const apiRemoveAccountFromFollowers = (id: string) =>
);
export const apiGetFeaturedTags = (id: string) =>
apiRequestGet<ApiHashtagJSON>(`v1/accounts/${id}/featured_tags`);
apiRequestGet<ApiHashtagJSON[]>(`v1/accounts/${id}/featured_tags`);
export const apiGetCurrentFeaturedTags = () =>
apiRequestGet<ApiFeaturedTagJSON[]>(`v1/featured_tags`);
export const apiPostFeaturedTag = (name: string) =>
apiRequestPost<ApiFeaturedTagJSON>('v1/featured_tags', { name });
export const apiDeleteFeaturedTag = (id: string) =>
apiRequestDelete(`v1/featured_tags/${id}`);
export const apiGetTagSuggestions = () =>
apiRequestGet<ApiHashtagJSON[]>('v1/featured_tags/suggestions');
export const apiGetEndorsedAccounts = (id: string) =>
apiRequestGet<ApiAccountJSON>(`v1/accounts/${id}/endorsements`);