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

                                                                                                 
                                                                                  
                                                                   
 
                                                  
 
                                                       


                                        
 






                                                          
 
import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
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,
      defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
    })
  }
}