Finished streamType Configuration backend

This commit is contained in:
rainbow napkin 2026-07-06 23:30:54 -04:00
parent e3507b00f8
commit a819d14861
3 changed files with 80 additions and 15 deletions

View file

@ -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/]
}
}
})
);