From 37a44fc915eef2140e22ceb96aba6b6eb2509007 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 17 Jun 2021 16:02:38 +0200 Subject: Add ability to search playlists --- server/helpers/custom-validators/activitypub/playlist.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'server/helpers/custom-validators') diff --git a/server/helpers/custom-validators/activitypub/playlist.ts b/server/helpers/custom-validators/activitypub/playlist.ts index bd0d16a4a..72c5b80e9 100644 --- a/server/helpers/custom-validators/activitypub/playlist.ts +++ b/server/helpers/custom-validators/activitypub/playlist.ts @@ -1,13 +1,16 @@ -import { exists, isDateValid } from '../misc' -import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' import validator from 'validator' import { PlaylistElementObject } from '../../../../shared/models/activitypub/objects/playlist-element-object' +import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' +import { exists, isDateValid, isUUIDValid } from '../misc' +import { isVideoPlaylistNameValid } from '../video-playlists' import { isActivityPubUrlValid } from './misc' function isPlaylistObjectValid (object: PlaylistObject) { return exists(object) && object.type === 'Playlist' && validator.isInt(object.totalItems + '') && + isVideoPlaylistNameValid(object.name) && + isUUIDValid(object.uuid) && isDateValid(object.published) && isDateValid(object.updated) } -- cgit v1.2.3