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

13 lines
477 B
JavaScript
Raw Normal View History

2018-02-25 03:20:33 +01:00
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))
}