aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/bulk/bulk-command.ts
blob: b5c5673ce635923eabc3c4aebec93d344febe17c (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                                         
                                                                   
 
                                                  
 
                                                       


                                        
 

                                 
 

                                              
                          


                                                          
 
import { BulkRemoveCommentsOfBody, HttpStatusCode } from '@shared/models'
import { AbstractCommand, OverrideCommandOptions } from '../shared'

export class BulkCommand extends AbstractCommand {

  removeCommentsOf (options: OverrideCommandOptions & {
    attributes: BulkRemoveCommentsOfBody
  }) {
    const { attributes } = options

    return this.postBodyRequest({
      ...options,

      path: '/api/v1/bulk/remove-comments-of',
      fields: attributes,
      implicitToken: true,
      defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
    })
  }
}