mirror of
https://github.com/karma-riuk/crab-webapp.git
synced 2025-07-04 22:08:12 +02:00
implemented the onlyResults query on /status
This commit is contained in:
@ -96,7 +96,11 @@ def status(id):
|
||||
|
||||
subject = Subject.id2subject[id]
|
||||
if subject.status == Status.COMPLETE:
|
||||
return jsonify({"status": "complete", "type": subject.type, "results": subject.results})
|
||||
only_results = request.args.get('onlyResults', 'false').lower() == 'true'
|
||||
if only_results:
|
||||
return jsonify(subject.results)
|
||||
else:
|
||||
return jsonify({"status": "complete", "type": subject.type, "results": subject.results})
|
||||
|
||||
socketio = current_app.extensions['socketio']
|
||||
sid = request.headers.get('X-Socket-Id')
|
||||
|
Reference in New Issue
Block a user