You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should be replaced by a generic method, to which you pass: the full input object and with a params setting or config object, the method should validate if input object complies to paramsConfig object.
The text was updated successfully, but these errors were encountered:
Currently, e.g. in histohour.js, input validation is implemented for each param, required and optional, with a lot of repetitive code:
// optional fields
// extraParams
if(msg.params && msg.params.extraParams){
urlParams.push("extraParams="+msg.params.extraParams);
}else{
if(node.extraParams || node.extraParams!=""){
urlParams.push("extraParams="+ node.extraParams);
}
}
// sign
if(msg.params && msg.params.sign){
urlParams.push("sign="+msg.params.sign);
}else{
if(node.sign || node.sign!=""){
urlParams.push("sign="+ node.sign);
}
}
This should be replaced by a generic method, to which you pass: the full input object and with a params setting or config object, the method should validate if input object complies to paramsConfig object.
The text was updated successfully, but these errors were encountered: