0
0
Fork 0

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

This commit is contained in:
Renaud Chaput 2024-06-25 15:45:41 +02:00 committed by GitHub
parent 309274839d
commit 547e97945d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 51 additions and 12 deletions

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,
},
});