1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Cleanup helpers

This commit is contained in:
Chocobozzz 2017-11-23 17:53:38 +01:00
parent 39445ead45
commit 8d468a16fd
No known key found for this signature in database
GPG key ID: 583A612D890159BE
12 changed files with 57 additions and 169 deletions

View file

@ -24,10 +24,6 @@ function isVideoChannelNameValid (value: string) {
return exists(value) && validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.NAME)
}
function isVideoChannelUUIDValid (value: string) {
return exists(value) && validator.isUUID('' + value, 4)
}
function checkVideoChannelExists (id: string, res: express.Response, callback: () => void) {
let promise: Promise<VideoChannelInstance>
if (validator.isInt(id)) {
@ -57,7 +53,6 @@ function checkVideoChannelExists (id: string, res: express.Response, callback: (
export {
isVideoChannelDescriptionValid,
isVideoChannelNameValid,
isVideoChannelUUIDValid,
checkVideoChannelExists,
isVideoChannelUrlValid
}