From 7d89d1f1866f5e35e04b48d268f0397731794e83 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 25 Jun 2024 18:53:03 +0200 Subject: [PATCH] [Glitch] Fix API requests after #30818 Port 2c7eed1fa1e7af72dd03a041a60f2cfd42e913e0 to glitch-soc --- app/javascript/flavours/glitch/api/accounts.ts | 4 +--- app/javascript/flavours/glitch/api/interactions.ts | 4 +--- app/javascript/flavours/glitch/api/notification_policies.ts | 5 +---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/javascript/flavours/glitch/api/accounts.ts b/app/javascript/flavours/glitch/api/accounts.ts index f2c9c43319..410f3d20e3 100644 --- a/app/javascript/flavours/glitch/api/accounts.ts +++ b/app/javascript/flavours/glitch/api/accounts.ts @@ -3,7 +3,5 @@ import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationship export const apiSubmitAccountNote = (id: string, value: string) => apiRequestPost(`v1/accounts/${id}/note`, { - data: { - comment: value, - }, + comment: value, }); diff --git a/app/javascript/flavours/glitch/api/interactions.ts b/app/javascript/flavours/glitch/api/interactions.ts index 1fb6fd50dd..172f97a256 100644 --- a/app/javascript/flavours/glitch/api/interactions.ts +++ b/app/javascript/flavours/glitch/api/interactions.ts @@ -3,9 +3,7 @@ import type { Status, StatusVisibility } from 'flavours/glitch/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/flavours/glitch/api/notification_policies.ts b/app/javascript/flavours/glitch/api/notification_policies.ts index 8ff1967b9f..e52ea64f41 100644 --- a/app/javascript/flavours/glitch/api/notification_policies.ts +++ b/app/javascript/flavours/glitch/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);