aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/bulk.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-07 14:32:36 +0100
committerGitHub <noreply@github.com>2020-12-07 14:32:36 +0100
commit2d53be0267acc49cda46707b885096193a1f4e9c (patch)
tree887061a34bc67f40acbb96a6278f9544bf83caeb /server/controllers/api/bulk.ts
parentadc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff)
downloadPeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip
replace numbers with typed http status codes (#3409)
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)