Claire 7d89d1f186 [Glitch] Fix API requests after #30818
Port 2c7eed1fa1e7af72dd03a041a60f2cfd42e913e0 to glitch-soc
2024-06-25 19:07:42 +02:00

11 lines
418 B
TypeScript

import { apiRequestPost } from 'flavours/glitch/api';
import type { Status, StatusVisibility } from 'flavours/glitch/models/status';
export const apiReblog = (statusId: string, visibility: StatusVisibility) =>
apiRequestPost<{ reblog: Status }>(`v1/statuses/${statusId}/reblog`, {
visibility,
});
export const apiUnreblog = (statusId: string) =>
apiRequestPost<Status>(`v1/statuses/${statusId}/unreblog`);