Make hook lookup workx
This commit is contained in:
parent
d577758fce
commit
447361ace7
@ -41,9 +41,15 @@ def webhook_receiver(id):
|
|||||||
# Process the data and perform actions based on the event
|
# Process the data and perform actions based on the event
|
||||||
print("Received webhook data:", data)
|
print("Received webhook data:", data)
|
||||||
|
|
||||||
target = hooks.get(id)
|
target = None
|
||||||
print(target)
|
for key, value in hooks.items():
|
||||||
sendmessage(target, data.get('message'))
|
print("%s/%s" % (str(key), str(id)))
|
||||||
|
if key == id:
|
||||||
|
target = value
|
||||||
|
|
||||||
|
if target is not None:
|
||||||
|
print(target)
|
||||||
|
sendmessage(target, data.get('message'))
|
||||||
|
|
||||||
return jsonify({'message': 'Webhook received successfully'}), 200
|
return jsonify({'message': 'Webhook received successfully'}), 200
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user