aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/bulk/bulk.ts
blob: c102383e33605caf59b1b0fa8b8948b8cd678983 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
import { AbstractCommand, CommonCommandOptions } from '../shared'

class BulkCommand extends AbstractCommand {

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

    return this.postBodyRequest({
      ...options,
      path: '/api/v1/bulk/remove-comments-of',
      fields: attributes,
      defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
    })
  }
}

export {
  BulkCommand
}