Fix my live videos filter

This commit is contained in:
Chocobozzz 2021-10-20 10:04:06 +02:00
parent 926bf5496f
commit c4c0c31144
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 3 additions and 3 deletions

View 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

View 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
}