aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/bulk/bulk.ts
blob: b6f437b8bfcf30b21751d352765c77f44d492a69 (plain) (tree)
1
2
3

                                                                                                 
                                                                                  














                                                            
                                                                       





                      
import { BulkRemoveCommentsOfBody } from "@shared/models/bulk/bulk-remove-comments-of-body.model"
import { makePostBodyRequest } from "../requests/requests"
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'

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 || HttpStatusCode.NO_CONTENT_204
  })
}

export {
  bulkRemoveCommentsOf
}