Commit 20b2e7fe authored by Ad Schellevis's avatar Ad Schellevis

(proxy) combine validate and save action

parent b7f55e9f
......@@ -101,22 +101,15 @@ class SettingsController extends ApiControllerBase
$result["validations"]["proxy.".$msg->getField()] = $msg->getMessage();
}
// serialize model to config
// serialize model to config and save
if ($valMsgs->count() == 0) {
$mdlProxy->serializeToConfig();
}
}
// save config if validated correctly
if (!array_key_exists("validations", $result)) {
$cnf = Config::getInstance();
$cnf->save();
$result["result"] = "saved";
}
}
return $result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment