aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/bulk.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/bulk.ts')
-rw-r--r--server/controllers/api/bulk.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/bulk.ts b/server/controllers/api/bulk.ts
index 1fe139c92..649351029 100644
--- a/server/controllers/api/bulk.ts
+++ b/server/controllers/api/bulk.ts
@@ -2,8 +2,9 @@ import * as express from 'express'
2import { asyncMiddleware, authenticate } from '../../middlewares' 2import { asyncMiddleware, authenticate } from '../../middlewares'
3import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk' 3import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk'
4import { VideoCommentModel } from '@server/models/video/video-comment' 4import { VideoCommentModel } from '@server/models/video/video-comment'
5import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
6import { removeComment } from '@server/lib/video-comment' 5import { removeComment } from '@server/lib/video-comment'
6import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
7import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
7 8
8const bulkRouter = express.Router() 9const bulkRouter = express.Router()
9 10
@@ -33,7 +34,7 @@ async function bulkRemoveCommentsOf (req: express.Request, res: express.Response
33 const comments = await VideoCommentModel.listForBulkDelete(account, filter) 34 const comments = await VideoCommentModel.listForBulkDelete(account, filter)
34 35
35 // Don't wait result 36 // Don't wait result
36 res.sendStatus(204) 37 res.sendStatus(HttpStatusCode.NO_CONTENT_204)
37 38
38 for (const comment of comments) { 39 for (const comment of comments) {
39 await removeComment(comment) 40 await removeComment(comment)