2024-06-25 22:45:41 +09:00
|
|
|
import { apiRequestPost } from 'mastodon/api';
|
2024-05-23 18:50:13 +09:00
|
|
|
import type { Status, StatusVisibility } from 'mastodon/models/status';
|
|
|
|
|
|
|
|
export const apiReblog = (statusId: string, visibility: StatusVisibility) =>
|
2024-06-25 22:45:41 +09:00
|
|
|
apiRequestPost<{ reblog: Status }>(`v1/statuses/${statusId}/reblog`, {
|
2024-06-26 01:53:03 +09:00
|
|
|
visibility,
|
2024-05-23 18:50:13 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
export const apiUnreblog = (statusId: string) =>
|
2024-06-25 22:45:41 +09:00
|
|
|
apiRequestPost<Status>(`v1/statuses/${statusId}/unreblog`);
|