} from '../../../middlewares/validators'
import { AccountModel } from '../../../models/account/account'
import { VideoCommentModel } from '../../../models/video/video-comment'
+import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
const auditLogger = auditLoggerFactory('comments')
const videoCommentRouter = express.Router()
}
}
+ if (resultList.data.length === 0) {
+ return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
+ }
+
return res.json(buildFormattedCommentTree(resultList))
}
auditLogger.delete(getAuditIdFromRes(res), new CommentAuditView(videoCommentInstance.toFormattedJSON()))
- return res.type('json').status(204).end()
+ return res.type('json')
+ .status(HttpStatusCode.NO_CONTENT_204)
+ .end()
}