]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/extra-utils/bulk/bulk-command.ts
Specify if we want to fallback to the server token
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / bulk / bulk-command.ts
1
2 import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
3 import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
4 import { AbstractCommand, OverrideCommandOptions } from '../shared'
5
6 export 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
16 path: '/api/v1/bulk/remove-comments-of',
17 fields: attributes,
18 implicitToken: true,
19 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
20 })
21 }
22 }