bulk-command.ts 560 B

1234567891011121314151617181920
  1. import { BulkRemoveCommentsOfBody, HttpStatusCode } from '@shared/models'
  2. import { AbstractCommand, OverrideCommandOptions } from '../shared'
  3. export class BulkCommand extends AbstractCommand {
  4. removeCommentsOf (options: OverrideCommandOptions & {
  5. attributes: BulkRemoveCommentsOfBody
  6. }) {
  7. const { attributes } = options
  8. return this.postBodyRequest({
  9. ...options,
  10. path: '/api/v1/bulk/remove-comments-of',
  11. fields: attributes,
  12. implicitToken: true,
  13. defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
  14. })
  15. }
  16. }