bulk.ts 693 B

12345678910111213141516171819202122232425
  1. import { BulkRemoveCommentsOfBody } from "@shared/models/bulk/bulk-remove-comments-of-body.model"
  2. import { makePostBodyRequest } from "../requests/requests"
  3. import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
  4. function bulkRemoveCommentsOf (options: {
  5. url: string
  6. token: string
  7. attributes: BulkRemoveCommentsOfBody
  8. expectedStatus?: number
  9. }) {
  10. const { url, token, attributes, expectedStatus } = options
  11. const path = '/api/v1/bulk/remove-comments-of'
  12. return makePostBodyRequest({
  13. url,
  14. path,
  15. token,
  16. fields: attributes,
  17. statusCodeExpected: expectedStatus || HttpStatusCode.NO_CONTENT_204
  18. })
  19. }
  20. export {
  21. bulkRemoveCommentsOf
  22. }