PeerTube/shared/extra-utils/server/redundancy.ts

18 lines
429 B
TypeScript
Raw Normal View History

2018-09-11 09:27:07 -05:00
import { makePutBodyRequest } from '../requests/requests'
async function updateRedundancy (url: string, accessToken: string, host: string, redundancyAllowed: boolean, expectedStatus = 204) {
const path = '/api/v1/server/redundancy/' + host
return makePutBodyRequest({
url,
path,
token: accessToken,
fields: { redundancyAllowed },
statusCodeExpected: expectedStatus
})
}
export {
updateRedundancy
}