X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fvideo-playlists.ts;h=2fe426560350683eb17a76f874a81cd084955aa9;hb=1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a;hp=e0eb423d7334f2dbd4ad3cb19ec166de40dd1397;hpb=09979f8959425390b879bce22101a9bc061ae9a0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/video-playlists.ts b/server/helpers/custom-validators/video-playlists.ts index e0eb423d7..2fe426560 100644 --- a/server/helpers/custom-validators/video-playlists.ts +++ b/server/helpers/custom-validators/video-playlists.ts @@ -1,6 +1,6 @@ import { exists } from './misc' import * as validator from 'validator' -import { CONSTRAINTS_FIELDS, VIDEO_PLAYLIST_PRIVACIES, VIDEO_PLAYLIST_TYPES } from '../../initializers' +import { CONSTRAINTS_FIELDS, VIDEO_PLAYLIST_PRIVACIES, VIDEO_PLAYLIST_TYPES } from '../../initializers/constants' import * as express from 'express' import { VideoPlaylistModel } from '../../models/video/video-playlist' @@ -26,7 +26,7 @@ function isVideoPlaylistTypeValid (value: any) { return exists(value) && VIDEO_PLAYLIST_TYPES[ value ] !== undefined } -async function isVideoPlaylistExist (id: number | string, res: express.Response, fetchType: 'summary' | 'all' = 'summary') { +async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: 'summary' | 'all' = 'summary') { const videoPlaylist = fetchType === 'summary' ? await VideoPlaylistModel.loadWithAccountAndChannelSummary(id, undefined) : await VideoPlaylistModel.loadWithAccountAndChannel(id, undefined) @@ -46,7 +46,7 @@ async function isVideoPlaylistExist (id: number | string, res: express.Response, // --------------------------------------------------------------------------- export { - isVideoPlaylistExist, + doesVideoPlaylistExist, isVideoPlaylistNameValid, isVideoPlaylistDescriptionValid, isVideoPlaylistPrivacyValid,