MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / checkSoftwareVersion

Function checkSoftwareVersion

src/astroprint/api/settings.py:588–598  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

586@api.route("/settings/software/check", methods=['GET'])
587@restricted_access
588def checkSoftwareVersion():
589 softwareInfo = softwareManager.checkSoftwareVersion()
590
591 if softwareInfo:
592 s = settings()
593 s.set(["software", "lastCheck"], int(time.time()))
594 s.save()
595
596 return jsonify(softwareInfo)
597 else:
598 return ("There was an error checking for new software.", 400)
599
600@api.route("/settings/software/update", methods=['POST', 'DELETE'])
601@restricted_access

Callers

nothing calls this directly

Calls 4

settingsFunction · 0.90
checkSoftwareVersionMethod · 0.45
setMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected