From 57cfff78858b2360d9e038e2a504b761cb51da47 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 May 2019 14:02:26 +0200 Subject: Remove unused actor uuid field --- server/helpers/custom-validators/video-channels.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'server/helpers/custom-validators/video-channels.ts') diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts index fd56b9a70..f818ce8f1 100644 --- a/server/helpers/custom-validators/video-channels.ts +++ b/server/helpers/custom-validators/video-channels.ts @@ -26,13 +26,8 @@ async function doesLocalVideoChannelNameExist (name: string, res: express.Respon return processVideoChannelExist(videoChannel, res) } -async function doesVideoChannelIdExist (id: number | string, res: express.Response) { - let videoChannel: VideoChannelModel - if (validator.isInt('' + id)) { - videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id) - } else { // UUID - videoChannel = await VideoChannelModel.loadByUUIDAndPopulateAccount('' + id) - } +async function doesVideoChannelIdExist (id: number, res: express.Response) { + const videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id) return processVideoChannelExist(videoChannel, res) } -- cgit v1.2.3