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