From f59545d97a80bf06025bf6343a80d834c7eb237f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 6 Jul 2021 10:22:37 +0200 Subject: Rename command files --- shared/extra-utils/bulk/bulk-command.ts | 20 ++++++++++++++++++++ shared/extra-utils/bulk/bulk.ts | 20 -------------------- shared/extra-utils/bulk/index.ts | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 shared/extra-utils/bulk/bulk-command.ts delete mode 100644 shared/extra-utils/bulk/bulk.ts (limited to 'shared/extra-utils/bulk') diff --git a/shared/extra-utils/bulk/bulk-command.ts b/shared/extra-utils/bulk/bulk-command.ts new file mode 100644 index 000000000..fcbf04164 --- /dev/null +++ b/shared/extra-utils/bulk/bulk-command.ts @@ -0,0 +1,20 @@ + +import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model' +import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' +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, + defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 + }) + } +} diff --git a/shared/extra-utils/bulk/bulk.ts b/shared/extra-utils/bulk/bulk.ts deleted file mode 100644 index a58fb3fbb..000000000 --- a/shared/extra-utils/bulk/bulk.ts +++ /dev/null @@ -1,20 +0,0 @@ - -import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model' -import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' -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, - defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 - }) - } -} diff --git a/shared/extra-utils/bulk/index.ts b/shared/extra-utils/bulk/index.ts index 5d2f9d3ad..391597243 100644 --- a/shared/extra-utils/bulk/index.ts +++ b/shared/extra-utils/bulk/index.ts @@ -1 +1 @@ -export * from './bulk' +export * from './bulk-command' -- cgit v1.2.3