diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 50dd1837..536b07f0 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -1130,7 +1130,7 @@ class PanelHandler(BaseHandler): page_data["server_stats"][ "server_type" ] = self.controller.servers.get_server_type_by_id(server_id) - page_data["new_webhook"] = True + page_data["new_webhook"] = False page_data["webhook"] = self.controller.management.get_webhook_by_id( webhook_id ) diff --git a/app/classes/web/routes/api/servers/server/webhooks/webhook/index.py b/app/classes/web/routes/api/servers/server/webhooks/webhook/index.py index b12603b4..499c99cb 100644 --- a/app/classes/web/routes/api/servers/server/webhooks/webhook/index.py +++ b/app/classes/web/routes/api/servers/server/webhooks/webhook/index.py @@ -120,6 +120,12 @@ class ApiServersServerWebhooksWebhookIndexHandler(BaseApiHandler): return self.finish_json(400, {"status": "error", "error": "NOT_AUTHORIZED"}) data["server_id"] = server_id + if "trigger" in data.keys(): + triggers = "" + for item in data["trigger"]: + string = item + "," + triggers += string + data["trigger"] = triggers self.controller.management.modify_webhook(webhook_id, data) self.controller.management.add_to_audit_log( diff --git a/app/frontend/templates/panel/server_webhook_edit.html b/app/frontend/templates/panel/server_webhook_edit.html index c050ebfd..493e3fda 100644 --- a/app/frontend/templates/panel/server_webhook_edit.html +++ b/app/frontend/templates/panel/server_webhook_edit.html @@ -40,7 +40,7 @@