aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/video-channels.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-23 17:53:38 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commit8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1 (patch)
tree078708f8316ed6294088b159f79e861664fca953 /server/helpers/custom-validators/video-channels.ts
parent39445ead45aaaea801ec09991b8dd2464f722e47 (diff)
downloadPeerTube-8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1.tar.gz
PeerTube-8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1.tar.zst
PeerTube-8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1.zip
Cleanup helpers
Diffstat (limited to 'server/helpers/custom-validators/video-channels.ts')
-rw-r--r--server/helpers/custom-validators/video-channels.ts5
1 files changed, 0 insertions, 5 deletions
diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts
index 5787c3850..5de01f74b 100644
--- a/server/helpers/custom-validators/video-channels.ts
+++ b/server/helpers/custom-validators/video-channels.ts
@@ -24,10 +24,6 @@ function isVideoChannelNameValid (value: string) {
24 return exists(value) && validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.NAME) 24 return exists(value) && validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.NAME)
25} 25}
26 26
27function isVideoChannelUUIDValid (value: string) {
28 return exists(value) && validator.isUUID('' + value, 4)
29}
30
31function checkVideoChannelExists (id: string, res: express.Response, callback: () => void) { 27function checkVideoChannelExists (id: string, res: express.Response, callback: () => void) {
32 let promise: Promise<VideoChannelInstance> 28 let promise: Promise<VideoChannelInstance>
33 if (validator.isInt(id)) { 29 if (validator.isInt(id)) {
@@ -57,7 +53,6 @@ function checkVideoChannelExists (id: string, res: express.Response, callback: (
57export { 53export {
58 isVideoChannelDescriptionValid, 54 isVideoChannelDescriptionValid,
59 isVideoChannelNameValid, 55 isVideoChannelNameValid,
60 isVideoChannelUUIDValid,
61 checkVideoChannelExists, 56 checkVideoChannelExists,
62 isVideoChannelUrlValid 57 isVideoChannelUrlValid
63} 58}