Skip to content

Commit

Permalink
[Glitch] Fix API requests after mastodon#30818
Browse files Browse the repository at this point in the history
Port 2c7eed1 to glitch-soc
  • Loading branch information
ClearlyClaire committed Jun 25, 2024
1 parent 85e6efd commit 7d89d1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 1 addition & 3 deletions app/javascript/flavours/glitch/api/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationship

export const apiSubmitAccountNote = (id: string, value: string) =>
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/note`, {
data: {
comment: value,
},
comment: value,
});
4 changes: 1 addition & 3 deletions app/javascript/flavours/glitch/api/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down
5 changes: 1 addition & 4 deletions app/javascript/flavours/glitch/api/notification_policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ export const apiGetNotificationPolicy = () =>

export const apiUpdateNotificationsPolicy = (
policy: Partial<NotificationPolicyJSON>,
) =>
apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', {
data: policy,
});
) => apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', policy);

0 comments on commit 7d89d1f

Please sign in to comment.