Skip to content
Snippets Groups Projects
Commit 66b97abc authored by Faruk Hammoud's avatar Faruk Hammoud
Browse files

test commps

parent 4ea2f64e
No related branches found
No related tags found
No related merge requests found
...@@ -26,13 +26,13 @@ def allowed_file(filename): ...@@ -26,13 +26,13 @@ def allowed_file(filename):
return '.' in filename and \ return '.' in filename and \
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
@app.route('/multicast/<code>', methods=['GET', 'POST']) @app.route('/multicast/<string:code>', methods=['GET', 'POST'])
def multicast(code): def multicast(code):
if request.method == 'POST': if request.method == 'POST':
content = request.json content = request.json
print(code,content['id']) print(code,content['id'])
socketio.emit('multicast', content, callback=confirmReception,namespace='/'+code) socketio.emit('multicast', jsonify(content), callback=confirmReception,namespace='/'+code)
return jsonify({"code":code,"id":content[id]}) return jsonify({"code":code,"id":content['id']})
return ''' return '''
<!doctype html> <!doctype html>
<title>Use a HTTP POST Request</title> <title>Use a HTTP POST Request</title>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment