From c4c0c31144b2cb8b6ade1cc39d676bc00c08cabf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Oct 2021 10:04:06 +0200 Subject: Fix my live videos filter --- server/middlewares/validators/users.ts | 2 +- server/models/video/video.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 8f1a7801f..33b31d54b 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -330,7 +330,7 @@ const usersVideosValidator = [ .custom(isIdValid).withMessage('Should have a valid channel id'), async (req: express.Request, res: express.Response, next: express.NextFunction) => { - logger.debug('Checking usersVideosValidator parameters', { parameters: req.params }) + logger.debug('Checking usersVideosValidator parameters', { parameters: req.query }) if (areValidationErrors(req, res)) return diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 4044287ee..a62ae2f23 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -43,7 +43,7 @@ import { VideoFilter } from '../../../shared/models/videos/video-query.type' import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' import { peertubeTruncate } from '../../helpers/core-utils' import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' -import { isBooleanValid } from '../../helpers/custom-validators/misc' +import { exists, isBooleanValid } from '../../helpers/custom-validators/misc' import { isVideoDescriptionValid, isVideoDurationValid, @@ -994,7 +994,7 @@ export class VideoModel extends Model>> { } } - if (isLive) { + if (exists(isLive)) { where.isLive = isLive } -- cgit v1.2.3