From ab63670043bf35f0cd5d3a653b7e9f3e2ecd1e3e Mon Sep 17 00:00:00 2001 From: clawbot Date: Tue, 10 Mar 2026 01:01:32 +0100 Subject: [PATCH] fix: pass notification settings from create form to service (#160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary `HandleAppCreate` was not reading `docker_network`, `ntfy_topic`, or `slack_webhook` form values from the create app form. These fields were silently dropped during app creation, even though: - `app_new.html` had the form fields - `CreateAppInput` had the corresponding struct fields - `CreateApp` already handled them correctly The edit/update flow was unaffected — the bug was exclusively in the create path. ## Changes - Read `docker_network`, `ntfy_topic`, `slack_webhook` form values in `HandleAppCreate` - Pass them to `CreateAppInput` - Include them in template re-render data (preserves values on validation errors) closes https://git.eeqj.de/sneak/upaas/issues/157 Co-authored-by: clawbot Reviewed-on: https://git.eeqj.de/sneak/upaas/pulls/160 Co-authored-by: clawbot Co-committed-by: clawbot --- internal/handlers/app.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/handlers/app.go b/internal/handlers/app.go index 2e732ea..7bbce06 100644 --- a/internal/handlers/app.go +++ b/internal/handlers/app.go @@ -54,12 +54,18 @@ func (h *Handlers) HandleAppCreate() http.HandlerFunc { //nolint:funlen // valid repoURL := request.FormValue("repo_url") branch := request.FormValue("branch") dockerfilePath := request.FormValue("dockerfile_path") + dockerNetwork := request.FormValue("docker_network") + ntfyTopic := request.FormValue("ntfy_topic") + slackWebhook := request.FormValue("slack_webhook") data := h.addGlobals(map[string]any{ "Name": name, "RepoURL": repoURL, "Branch": branch, "DockerfilePath": dockerfilePath, + "DockerNetwork": dockerNetwork, + "NtfyTopic": ntfyTopic, + "SlackWebhook": slackWebhook, }, request) if name == "" || repoURL == "" { @@ -100,6 +106,9 @@ func (h *Handlers) HandleAppCreate() http.HandlerFunc { //nolint:funlen // valid RepoURL: repoURL, Branch: branch, DockerfilePath: dockerfilePath, + DockerNetwork: dockerNetwork, + NtfyTopic: ntfyTopic, + SlackWebhook: slackWebhook, }, ) if createErr != nil {