Spaces:
Runtime error
Runtime error
SherlockRamos
commited on
Commit
•
2b65b48
1
Parent(s):
0a22652
Update app.py
Browse files
app.py
CHANGED
@@ -2,13 +2,11 @@ from flask import Flask, request, jsonify
|
|
2 |
|
3 |
app = Flask(__name__)
|
4 |
|
5 |
-
@app.route('/
|
6 |
-
def
|
7 |
data = request.json
|
8 |
-
#
|
9 |
-
|
10 |
-
resposta = {"mensagem": "Dados recebidos com sucesso!", "seus_dados": data}
|
11 |
-
return jsonify(resposta)
|
12 |
-
|
13 |
-
# End Generation Here
|
14 |
|
|
|
|
|
|
2 |
|
3 |
app = Flask(__name__)
|
4 |
|
5 |
+
@app.route('/webhook', methods=['POST'])
|
6 |
+
def webhook():
|
7 |
data = request.json
|
8 |
+
# Processar os dados recebidos
|
9 |
+
return jsonify({'status': 'success'}), 200
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
if __name__ == '__main__':
|
12 |
+
app.run(host='0.0.0.0', port=5000)
|