diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-21 15:51:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-21 15:51:30 +0200 |
commit | a24bd1ed41b43790bab6ba789580bb4e85f07d85 (patch) | |
tree | a54b0f6c921ba83a6e909cd0ced325b2d4b8863c /shared/extra-utils/bulk/bulk-command.ts | |
parent | 5f26f13b3c16ac5ae0a3b0a7142d84a9528cf565 (diff) | |
parent | c63830f15403ac4e750829f27d8bbbdc9a59282c (diff) | |
download | PeerTube-a24bd1ed41b43790bab6ba789580bb4e85f07d85.tar.gz PeerTube-a24bd1ed41b43790bab6ba789580bb4e85f07d85.tar.zst PeerTube-a24bd1ed41b43790bab6ba789580bb4e85f07d85.zip |
Merge branch 'next' into develop
Diffstat (limited to 'shared/extra-utils/bulk/bulk-command.ts')
-rw-r--r-- | shared/extra-utils/bulk/bulk-command.ts | 20 |
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..b5c5673ce --- /dev/null +++ b/shared/extra-utils/bulk/bulk-command.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { BulkRemoveCommentsOfBody, HttpStatusCode } from '@shared/models' | ||
2 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | ||
3 | |||
4 | export class BulkCommand extends AbstractCommand { | ||
5 | |||
6 | removeCommentsOf (options: OverrideCommandOptions & { | ||
7 | attributes: BulkRemoveCommentsOfBody | ||
8 | }) { | ||
9 | const { attributes } = options | ||
10 | |||
11 | return this.postBodyRequest({ | ||
12 | ...options, | ||
13 | |||
14 | path: '/api/v1/bulk/remove-comments-of', | ||
15 | fields: attributes, | ||
16 | implicitToken: true, | ||
17 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 | ||
18 | }) | ||
19 | } | ||
20 | } | ||