diff options
Diffstat (limited to 'shared/extra-utils/bulk')
-rw-r--r-- | shared/extra-utils/bulk/bulk.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/shared/extra-utils/bulk/bulk.ts b/shared/extra-utils/bulk/bulk.ts new file mode 100644 index 000000000..d6798ceb7 --- /dev/null +++ b/shared/extra-utils/bulk/bulk.ts | |||
@@ -0,0 +1,24 @@ | |||
1 | import { BulkRemoveCommentsOfBody } from "@shared/models/bulk/bulk-remove-comments-of-body.model" | ||
2 | import { makePostBodyRequest } from "../requests/requests" | ||
3 | |||
4 | function bulkRemoveCommentsOf (options: { | ||
5 | url: string | ||
6 | token: string | ||
7 | attributes: BulkRemoveCommentsOfBody | ||
8 | expectedStatus?: number | ||
9 | }) { | ||
10 | const { url, token, attributes, expectedStatus } = options | ||
11 | const path = '/api/v1/bulk/remove-comments-of' | ||
12 | |||
13 | return makePostBodyRequest({ | ||
14 | url, | ||
15 | path, | ||
16 | token, | ||
17 | fields: attributes, | ||
18 | statusCodeExpected: expectedStatus || 204 | ||
19 | }) | ||
20 | } | ||
21 | |||
22 | export { | ||
23 | bulkRemoveCommentsOf | ||
24 | } | ||