Fix my live videos filter
This commit is contained in:
parent
926bf5496f
commit
c4c0c31144
|
@ -330,7 +330,7 @@ const usersVideosValidator = [
|
||||||
.custom(isIdValid).withMessage('Should have a valid channel id'),
|
.custom(isIdValid).withMessage('Should have a valid channel id'),
|
||||||
|
|
||||||
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
|
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
|
if (areValidationErrors(req, res)) return
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ import { VideoFilter } from '../../../shared/models/videos/video-query.type'
|
||||||
import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
|
import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
|
||||||
import { peertubeTruncate } from '../../helpers/core-utils'
|
import { peertubeTruncate } from '../../helpers/core-utils'
|
||||||
import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
|
import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
|
||||||
import { isBooleanValid } from '../../helpers/custom-validators/misc'
|
import { exists, isBooleanValid } from '../../helpers/custom-validators/misc'
|
||||||
import {
|
import {
|
||||||
isVideoDescriptionValid,
|
isVideoDescriptionValid,
|
||||||
isVideoDurationValid,
|
isVideoDurationValid,
|
||||||
|
@ -994,7 +994,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLive) {
|
if (exists(isLive)) {
|
||||||
where.isLive = isLive
|
where.isLive = isLive
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue