From 2c7eed1fa1e7af72dd03a041a60f2cfd42e913e0 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 25 Jun 2024 18:53:03 +0200 Subject: [PATCH] Fix API requests after #30818 (#30837) --- app/javascript/mastodon/api/accounts.ts | 4 +--- app/javascript/mastodon/api/interactions.ts | 4 +--- app/javascript/mastodon/api/notification_policies.ts | 5 +---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/javascript/mastodon/api/accounts.ts b/app/javascript/mastodon/api/accounts.ts index e586087854d..bd1757e827e 100644 --- a/app/javascript/mastodon/api/accounts.ts +++ b/app/javascript/mastodon/api/accounts.ts @@ -3,7 +3,5 @@ import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships'; export const apiSubmitAccountNote = (id: string, value: string) => apiRequestPost(`v1/accounts/${id}/note`, { - data: { - comment: value, - }, + comment: value, }); diff --git a/app/javascript/mastodon/api/interactions.ts b/app/javascript/mastodon/api/interactions.ts index 0bdaffbda19..118b5f06d20 100644 --- a/app/javascript/mastodon/api/interactions.ts +++ b/app/javascript/mastodon/api/interactions.ts @@ -3,9 +3,7 @@ import type { Status, StatusVisibility } from 'mastodon/models/status'; export const apiReblog = (statusId: string, visibility: StatusVisibility) => apiRequestPost<{ reblog: Status }>(`v1/statuses/${statusId}/reblog`, { - data: { - visibility, - }, + visibility, }); export const apiUnreblog = (statusId: string) => diff --git a/app/javascript/mastodon/api/notification_policies.ts b/app/javascript/mastodon/api/notification_policies.ts index 5c1ef9c1dd6..4032134fb58 100644 --- a/app/javascript/mastodon/api/notification_policies.ts +++ b/app/javascript/mastodon/api/notification_policies.ts @@ -6,7 +6,4 @@ export const apiGetNotificationPolicy = () => export const apiUpdateNotificationsPolicy = ( policy: Partial, -) => - apiRequestPut('/v1/notifications/policy', { - data: policy, - }); +) => apiRequestPut('/v1/notifications/policy', policy);