2020-05-14 09:56:15 -05:00
|
|
|
import { BulkRemoveCommentsOfBody } from "@shared/models/bulk/bulk-remove-comments-of-body.model"
|
|
|
|
import { makePostBodyRequest } from "../requests/requests"
|
2020-12-07 07:32:36 -06:00
|
|
|
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
|
2020-05-14 09:56:15 -05:00
|
|
|
|
|
|
|
function bulkRemoveCommentsOf (options: {
|
|
|
|
url: string
|
|
|
|
token: string
|
|
|
|
attributes: BulkRemoveCommentsOfBody
|
|
|
|
expectedStatus?: number
|
|
|
|
}) {
|
|
|
|
const { url, token, attributes, expectedStatus } = options
|
|
|
|
const path = '/api/v1/bulk/remove-comments-of'
|
|
|
|
|
|
|
|
return makePostBodyRequest({
|
|
|
|
url,
|
|
|
|
path,
|
|
|
|
token,
|
|
|
|
fields: attributes,
|
2020-12-07 07:32:36 -06:00
|
|
|
statusCodeExpected: expectedStatus || HttpStatusCode.NO_CONTENT_204
|
2020-05-14 09:56:15 -05:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
bulkRemoveCommentsOf
|
|
|
|
}
|