mirror of
https://github.com/funamitech/mastodon
synced 2024-12-15 07:09:03 +09:00
11 lines
408 B
TypeScript
11 lines
408 B
TypeScript
|
import { apiRequest } from 'mastodon/api';
|
||
|
import type { Status, StatusVisibility } from 'mastodon/models/status';
|
||
|
|
||
|
export const apiReblog = (statusId: string, visibility: StatusVisibility) =>
|
||
|
apiRequest<{ reblog: Status }>('post', `v1/statuses/${statusId}/reblog`, {
|
||
|
visibility,
|
||
|
});
|
||
|
|
||
|
export const apiUnreblog = (statusId: string) =>
|
||
|
apiRequest<Status>('post', `v1/statuses/${statusId}/unreblog`);
|