@create.format_func(StatusResult, 'text')
def _format_status_text(result: StatusResult) -> str:
- return result.message
+ if result.status:
+ return f"ERROR: {result.message}"
+
+ return 'OK'
@create.format_func(StatusResult, 'json')
out['status'] = result.status
out['message'] = result.message
if result.data_updated is not None:
- out['data_updated'] = result.data_updated
+ out['data_updated'] = result.data_updated.isoformat()
out['software_version'] = result.software_version
if result.database_version is not None:
out['database_version'] = result.database_version