aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/video-channels.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-05-31 14:02:26 +0200
committerChocobozzz <me@florianbigard.com>2019-05-31 14:49:31 +0200
commit57cfff78858b2360d9e038e2a504b761cb51da47 (patch)
tree28575a83f1680f9c40f04b8a71b4f2eb35f90400 /server/helpers/custom-validators/video-channels.ts
parent4c72c1cd411b4ff7ed054b584f184117bae91d5b (diff)
downloadPeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.tar.gz
PeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.tar.zst
PeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.zip
Remove unused actor uuid field
Diffstat (limited to 'server/helpers/custom-validators/video-channels.ts')
-rw-r--r--server/helpers/custom-validators/video-channels.ts9
1 files changed, 2 insertions, 7 deletions
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
26 return processVideoChannelExist(videoChannel, res) 26 return processVideoChannelExist(videoChannel, res)
27} 27}
28 28
29async function doesVideoChannelIdExist (id: number | string, res: express.Response) { 29async function doesVideoChannelIdExist (id: number, res: express.Response) {
30 let videoChannel: VideoChannelModel 30 const videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id)
31 if (validator.isInt('' + id)) {
32 videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id)
33 } else { // UUID
34 videoChannel = await VideoChannelModel.loadByUUIDAndPopulateAccount('' + id)
35 }
36 31
37 return processVideoChannelExist(videoChannel, res) 32 return processVideoChannelExist(videoChannel, res)
38} 33}