API CHANGE

Add a new field in the output args for the sysadm/updates check for updates:
"last_check":"<ISO date/time stamp>"

This returns the timestamp the last time a "full" check was performed (since some checks are flagged as quick/automatic and just re-use the previous check unless a significant amount of time has passed first - 12 hours is what it is set to right now).
This commit is contained in:
Ken Moore
2016-08-10 11:45:52 -04:00
parent a2bba87315
commit 12ba560fd6

View File

@@ -59,6 +59,7 @@ QJsonObject Update::checkUpdates(bool fast) {
General::writeTextFile(UP_UPFILE, output); //save this check for later "fast" updates
}
//qDebug() << "pc-updatemanager checks:" << output;
QString nameval;
int pnum=1;
for ( int i = 0; i < output.size(); i++)
@@ -106,6 +107,7 @@ QJsonObject Update::checkUpdates(bool fast) {
// Update status that we have updates
retObject.insert("status", "updatesavailable");
}
retObject.insert("last_check",QFileInfo(UP_UPFILE).lastModified().toString(Qt::ISODate) );
return retObject;
}
@@ -276,4 +278,3 @@ QJsonObject Update::writeSettings(QJsonObject obj){
}
return ret;
}