Finished streamType Configuration backend
This commit is contained in:
parent
e3507b00f8
commit
a819d14861
3 changed files with 80 additions and 15 deletions
|
|
@ -20,15 +20,6 @@ const { checkSchema, checkExact } = require('express-validator');
|
|||
//local imports
|
||||
const accountValidator = require('./accountValidator');
|
||||
|
||||
module.exports = {
|
||||
|
||||
settingsMap: () => checkExact(checkSchema({
|
||||
'settingsMap.hidden': {
|
||||
optional: true,
|
||||
isBoolean: true,
|
||||
} }))
|
||||
}
|
||||
|
||||
module.exports.name = function(field = 'name'){
|
||||
return checkSchema({
|
||||
[field]: {
|
||||
|
|
@ -89,6 +80,13 @@ module.exports.settingsMap = function(){
|
|||
}
|
||||
},
|
||||
errorMessage: "Invalid Stream URL"
|
||||
},
|
||||
'settingsMap.streamType': {
|
||||
optional: true,
|
||||
errorMessage: "Invalid Stream Type",
|
||||
matches: {
|
||||
options: [/\b(?:webrtc|hls)\b/]
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue