Change apiRequest to accept both params and data (#30818)

This commit is contained in:
Renaud Chaput authored and GitHub committed 2024-06-25 13:45:41 +00:00
1 parent 309274839d
commit 547e97945d
4 files changed
+51 -12

No files matched your search

+5 -3
View File
@@ -1,7 +1,9 @@
import { apiRequest } from 'mastodon/api';
import { apiRequestPost } from 'mastodon/api';
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships';
export const apiSubmitAccountNote = (id: string, value: string) =>
apiRequest<ApiRelationshipJSON>('post', `v1/accounts/${id}/note`, {
comment: value,
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/note`, {
data: {
comment: value,
},
});