diff options
Diffstat (limited to 'server/controllers/api/bulk.ts')
-rw-r--r-- | server/controllers/api/bulk.ts | 5 |
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' | |||
2 | import { asyncMiddleware, authenticate } from '../../middlewares' | 2 | import { asyncMiddleware, authenticate } from '../../middlewares' |
3 | import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk' | 3 | import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk' |
4 | import { VideoCommentModel } from '@server/models/video/video-comment' | 4 | import { VideoCommentModel } from '@server/models/video/video-comment' |
5 | import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model' | ||
6 | import { removeComment } from '@server/lib/video-comment' | 5 | import { removeComment } from '@server/lib/video-comment' |
6 | import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model' | ||
7 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | ||
7 | 8 | ||
8 | const bulkRouter = express.Router() | 9 | const 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) |