Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,16 +3,11 @@ import requests
|
|
3 |
|
4 |
app = Flask(__name__)
|
5 |
|
6 |
-
@app.route('/api/webhooks/<webhook_id>/<webhook_token>', methods=['
|
7 |
-
def
|
8 |
-
payload = request.json
|
9 |
-
headers = {
|
10 |
-
'Content-Type': 'application/json'
|
11 |
-
}
|
12 |
-
|
13 |
discord_url = f"https://discord.com/api/webhooks/{webhook_id}/{webhook_token}"
|
14 |
|
15 |
-
response = requests.
|
16 |
|
17 |
return jsonify(response.json()), response.status_code
|
18 |
|
|
|
3 |
|
4 |
app = Flask(__name__)
|
5 |
|
6 |
+
@app.route('/api/webhooks/<webhook_id>/<webhook_token>', methods=['GET'])
|
7 |
+
def mirror_discord_webhook_get(webhook_id, webhook_token):
|
|
|
|
|
|
|
|
|
|
|
8 |
discord_url = f"https://discord.com/api/webhooks/{webhook_id}/{webhook_token}"
|
9 |
|
10 |
+
response = requests.get(discord_url)
|
11 |
|
12 |
return jsonify(response.json()), response.status_code
|
13 |
|