mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Refactor test webhooks with data
This commit is contained in:
parent
a62252ed15
commit
19d72e5766
@ -175,10 +175,11 @@ class ApiServersServerWebhooksManagementIndexHandler(BaseApiHandler):
|
||||
server_name=self.controller.servers.get_server_data_by_id(server_id)[
|
||||
"server_name"
|
||||
],
|
||||
title="Test Webhook",
|
||||
title=f"Test Webhook: {webhook['name']}",
|
||||
url=webhook["url"],
|
||||
message=webhook["body"],
|
||||
color="#4b00d1", # Prestigious purple!
|
||||
color=webhook["color"], # Prestigious purple!
|
||||
bot_name="Crafty Webhooks Tester",
|
||||
)
|
||||
except Exception as e:
|
||||
self.finish_json(500, {"status": "error", "error": str(e)})
|
||||
|
Loading…
Reference in New Issue
Block a user