@app.route('<STR_LIT>', methods=['<STR_LIT:GET>'])<EOL>def current_app(device_id):
if not is_valid_device_id(device_id):<EOL><INDENT>abort(<NUM_LIT>)<EOL><DEDENT>if device_id not in devices:<EOL><INDENT>abort(<NUM_LIT>)<EOL><DEDENT>current = devices[device_id].current_app<EOL>if current is None:<EOL><INDENT>abort(<NUM_LIT>)<EOL><DEDENT>return jsonify(current_app=current)<EOL>
Get currently running app.