Retrieves the current installed version of TinyPilot. Returns: On success, a JSON data structure with the following properties: version: str. Example: { "version": "1.2.3-16+7a6c812", } Returns error object on failure.
()
| 404 | @api_blueprint.route('/version', methods=['GET']) |
| 405 | @required_auth(auth.Role.OPERATOR) |
| 406 | def version_get(): |
| 407 | """Retrieves the current installed version of TinyPilot. |
| 408 | |
| 409 | Returns: |
| 410 | On success, a JSON data structure with the following properties: |
| 411 | version: str. |
| 412 | |
| 413 | Example: |
| 414 | { |
| 415 | "version": "1.2.3-16+7a6c812", |
| 416 | } |
| 417 | |
| 418 | Returns error object on failure. |
| 419 | """ |
| 420 | try: |
| 421 | return json_response.success({'version': version.local_version()}) |
| 422 | except version.Error as e: |
| 423 | return json_response.error(e), 500 |
| 424 | |
| 425 | |
| 426 | @api_blueprint.route('/latestRelease', methods=['GET']) |
nothing calls this directly
no outgoing calls
no test coverage detected