Pinafore-Web-Client-Frontend/routes/_api/reblog.js

13 lines
477 B
JavaScript

import { post } from '../_utils/ajax'
import { basename, auth } from './utils'
export async function reblogStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/reblog`
return post(url, null, auth(accessToken))
}
export async function unreblogStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/unreblog`
return post(url, null, auth(accessToken))
}