aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/bulk/bulk.ts
blob: d6798ceb762c24ac7182c04fe463afb4710b9a15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { BulkRemoveCommentsOfBody } from "@shared/models/bulk/bulk-remove-comments-of-body.model"
import { makePostBodyRequest } from "../requests/requests"

function bulkRemoveCommentsOf (options: {
  url: string
  token: string
  attributes: BulkRemoveCommentsOfBody
  expectedStatus?: number
}) {
  const { url, token, attributes, expectedStatus } = options
  const path = '/api/v1/bulk/remove-comments-of'

  return makePostBodyRequest({
    url,
    path,
    token,
    fields: attributes,
    statusCodeExpected: expectedStatus || 204
  })
}

export {
  bulkRemoveCommentsOf
}