From 373a28c4f52ffd435f15c7f71a652e6fb0044a4e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 10 Aug 2016 11:51:22 -0400 Subject: [PATCH] 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. --- src/server/WebBackend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/WebBackend.cpp b/src/server/WebBackend.cpp index 9801a52..4c71cd6 100644 --- a/src/server/WebBackend.cpp +++ b/src/server/WebBackend.cpp @@ -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;