mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Implement support field in video and video channel
This commit is contained in:
parent
34cbef8c6c
commit
2422c46b27
49 changed files with 490 additions and 146 deletions
|
@ -16,6 +16,10 @@ function isVideoChannelNameValid (value: string) {
|
|||
return exists(value) && validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.NAME)
|
||||
}
|
||||
|
||||
function isVideoChannelSupportValid (value: string) {
|
||||
return value === null || (exists(value) && validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.SUPPORT))
|
||||
}
|
||||
|
||||
async function isVideoChannelExist (id: string, res: express.Response) {
|
||||
let videoChannel: VideoChannelModel
|
||||
if (validator.isInt(id)) {
|
||||
|
@ -41,5 +45,6 @@ async function isVideoChannelExist (id: string, res: express.Response) {
|
|||
export {
|
||||
isVideoChannelDescriptionValid,
|
||||
isVideoChannelNameValid,
|
||||
isVideoChannelSupportValid,
|
||||
isVideoChannelExist
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue