aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/redundancy.ts
blob: c39ff2c8be4baaa477dfa5fa1736c563aa2fc621 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}