mirror of
https://github.com/karma-riuk/crab-webapp.git
synced 2025-07-05 06:08:13 +02:00
implemented the onlyResults query on /status
This commit is contained in:
@ -96,6 +96,10 @@ def status(id):
|
|||||||
|
|
||||||
subject = Subject.id2subject[id]
|
subject = Subject.id2subject[id]
|
||||||
if subject.status == Status.COMPLETE:
|
if subject.status == Status.COMPLETE:
|
||||||
|
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})
|
return jsonify({"status": "complete", "type": subject.type, "results": subject.results})
|
||||||
|
|
||||||
socketio = current_app.extensions['socketio']
|
socketio = current_app.extensions['socketio']
|
||||||
|
Reference in New Issue
Block a user