From bf54587a3e2ad9c2c186828f2a5682b91ee2cc00 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Dec 2021 09:29:23 +0100 Subject: shared/ typescript types dir server-commands --- shared/server-commands/bulk/bulk-command.ts | 20 ++++++++++++++++++++ shared/server-commands/bulk/index.ts | 1 + 2 files changed, 21 insertions(+) create mode 100644 shared/server-commands/bulk/bulk-command.ts create mode 100644 shared/server-commands/bulk/index.ts (limited to 'shared/server-commands/bulk') diff --git a/shared/server-commands/bulk/bulk-command.ts b/shared/server-commands/bulk/bulk-command.ts new file mode 100644 index 000000000..b5c5673ce --- /dev/null +++ b/shared/server-commands/bulk/bulk-command.ts @@ -0,0 +1,20 @@ +import { BulkRemoveCommentsOfBody, HttpStatusCode } from '@shared/models' +import { AbstractCommand, OverrideCommandOptions } from '../shared' + +export class BulkCommand extends AbstractCommand { + + removeCommentsOf (options: OverrideCommandOptions & { + attributes: BulkRemoveCommentsOfBody + }) { + const { attributes } = options + + return this.postBodyRequest({ + ...options, + + path: '/api/v1/bulk/remove-comments-of', + fields: attributes, + implicitToken: true, + defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 + }) + } +} diff --git a/shared/server-commands/bulk/index.ts b/shared/server-commands/bulk/index.ts new file mode 100644 index 000000000..391597243 --- /dev/null +++ b/shared/server-commands/bulk/index.ts @@ -0,0 +1 @@ +export * from './bulk-command' -- cgit v1.2.3