aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/bulk/bulk-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/bulk/bulk-command.ts')
-rw-r--r--shared/extra-utils/bulk/bulk-command.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/shared/extra-utils/bulk/bulk-command.ts b/shared/extra-utils/bulk/bulk-command.ts
new file mode 100644
index 000000000..fcbf04164
--- /dev/null
+++ b/shared/extra-utils/bulk/bulk-command.ts
@@ -0,0 +1,20 @@
1
2import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
3import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
4import { AbstractCommand, OverrideCommandOptions } from '../shared'
5
6export class BulkCommand extends AbstractCommand {
7
8 removeCommentsOf (options: OverrideCommandOptions & {
9 attributes: BulkRemoveCommentsOfBody
10 }) {
11 const { attributes } = options
12
13 return this.postBodyRequest({
14 ...options,
15 path: '/api/v1/bulk/remove-comments-of',
16 fields: attributes,
17 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
18 })
19 }
20}