API CHANGE

Add a new optional input argument to the sysadm/updates, "checkupdates" action:
"force":"[true/false]" (default is false)

This tells the check system to skip all previous checks for updates and re-run the update routines to look for new updates (if force==true), otherwise it might return the previous result of the update check if not enough time has passed since the other check.
This commit is contained in:
Ken Moore
2016-08-10 11:51:22 -04:00
parent 12ba560fd6
commit 373a28c4f5

View File

@@ -572,7 +572,9 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmUpdateRequest(const QJsonVal
QString act = JsonValueToString(in_args.toObject().value("action"));
if(act=="checkupdates"){
ok = true;
out->insert("checkupdates", sysadm::Update::checkUpdates());
bool fastcheck = true;
fastcheck = in_args.toObject().value("force").toString().toLower()!="true";
out->insert("checkupdates", sysadm::Update::checkUpdates(fastcheck));
}else if(act=="listbranches"){
ok = true;