1
0
Fork 0
peertube/shared/extra-utils/bulk/bulk-command.ts

21 lines
560 B
TypeScript
Raw Normal View History

2021-07-16 08:42:24 +00:00
import { BulkRemoveCommentsOfBody, HttpStatusCode } from '@shared/models'
2021-07-06 07:55:05 +00:00
import { AbstractCommand, OverrideCommandOptions } from '../shared'
2021-07-05 12:57:03 +00:00
2021-07-06 07:55:05 +00:00
export class BulkCommand extends AbstractCommand {
2020-05-14 14:56:15 +00:00
2021-07-06 07:55:05 +00:00
removeCommentsOf (options: OverrideCommandOptions & {
2021-07-05 12:57:03 +00:00
attributes: BulkRemoveCommentsOfBody
}) {
const { attributes } = options
2020-05-14 14:56:15 +00:00
2021-07-05 12:57:03 +00:00
return this.postBodyRequest({
...options,
2021-07-05 12:57:03 +00:00
path: '/api/v1/bulk/remove-comments-of',
fields: attributes,
implicitToken: true,
2021-07-05 12:57:03 +00:00
defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
})
}
2020-05-14 14:56:15 +00:00
}