]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/bulk.ts
Try to fix weird CI test crashes
[github/Chocobozzz/PeerTube.git] / server / controllers / api / bulk.ts
index 649351029f1fb569aa12eaf0a0222b262d34bc57..62121ece5a2021e5fa273f99656ac0efedb4a040 100644 (file)
@@ -1,10 +1,10 @@
 import * as express from 'express'
-import { asyncMiddleware, authenticate } from '../../middlewares'
+import { removeComment } from '@server/lib/video-comment'
 import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bulk'
 import { VideoCommentModel } from '@server/models/video/video-comment'
-import { removeComment } from '@server/lib/video-comment'
+import { HttpStatusCode } from '@shared/models'
 import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
-import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
+import { asyncMiddleware, authenticate } from '../../middlewares'
 
 const bulkRouter = express.Router()
 
@@ -34,7 +34,7 @@ async function bulkRemoveCommentsOf (req: express.Request, res: express.Response
   const comments = await VideoCommentModel.listForBulkDelete(account, filter)
 
   // Don't wait result
-  res.sendStatus(HttpStatusCode.NO_CONTENT_204)
+  res.status(HttpStatusCode.NO_CONTENT_204).end()
 
   for (const comment of comments) {
     await removeComment(comment)