]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix my live videos filter
authorChocobozzz <me@florianbigard.com>
Wed, 20 Oct 2021 08:04:06 +0000 (10:04 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 20 Oct 2021 08:04:06 +0000 (10:04 +0200)
server/middlewares/validators/users.ts
server/models/video/video.ts

index 8f1a7801f351da4507b8ac9715f6a0fdc3d10995..33b31d54b83c93317f664d6ea186efacbc27b04f 100644 (file)
@@ -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
 
index 4044287eea39e569cb5deb549e333b4d596eed3a..a62ae2f237047dc9088d1f36d9ff119ae4960173 100644 (file)
@@ -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<Partial<AttributesOnly<VideoModel>>> {
         }
       }
 
-      if (isLive) {
+      if (exists(isLive)) {
         where.isLive = isLive
       }