2018-02-25 06:27:32 +01:00
|
|
|
import { favoriteStatus } from '../routes/_api/favorite'
|
|
|
|
import fetch from 'node-fetch'
|
2018-03-10 19:54:16 +01:00
|
|
|
import FileApi from 'file-api'
|
2018-03-06 05:29:49 +01:00
|
|
|
import { users } from './users'
|
2018-03-10 19:54:16 +01:00
|
|
|
import { postStatus } from '../routes/_api/statuses'
|
|
|
|
|
2018-03-06 08:56:48 +01:00
|
|
|
global.fetch = fetch
|
2018-03-10 19:54:16 +01:00
|
|
|
global.File = FileApi.File
|
|
|
|
global.FormData = FileApi.FormData
|
2018-02-25 06:27:32 +01:00
|
|
|
|
|
|
|
export async function favoriteStatusAsAdmin (statusId) {
|
2018-03-06 05:29:49 +01:00
|
|
|
return favoriteStatus('localhost:3000', users.admin.accessToken, statusId)
|
2018-02-25 06:27:32 +01:00
|
|
|
}
|
2018-03-10 19:54:16 +01:00
|
|
|
|
|
|
|
export async function postAsAdmin (text) {
|
|
|
|
return postStatus('localhost:3000', users.admin.accessToken, text,
|
|
|
|
null, null, false, null, 'public')
|
|
|
|
}
|