]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/server-commands/bulk/bulk-command.ts
shared/ typescript types dir server-commands
[github/Chocobozzz/PeerTube.git] / shared / server-commands / bulk / bulk-command.ts
CommitLineData
c0e8b12e 1import { BulkRemoveCommentsOfBody, HttpStatusCode } from '@shared/models'
e8bd7ce7 2import { AbstractCommand, OverrideCommandOptions } from '../shared'
a6a79eae 3
e8bd7ce7 4export class BulkCommand extends AbstractCommand {
444c0a0e 5
e8bd7ce7 6 removeCommentsOf (options: OverrideCommandOptions & {
a6a79eae
C
7 attributes: BulkRemoveCommentsOfBody
8 }) {
9 const { attributes } = options
444c0a0e 10
a6a79eae
C
11 return this.postBodyRequest({
12 ...options,
a1637fa1 13
a6a79eae
C
14 path: '/api/v1/bulk/remove-comments-of',
15 fields: attributes,
a1637fa1 16 implicitToken: true,
a6a79eae
C
17 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
18 })
19 }
444c0a0e 20}