From 3588c589e46c2329c6c8e16a4d43cc8dff4f26aa Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Wed, 3 Jul 2024 15:57:43 +0200 Subject: [PATCH] SMTP GUI: Fixing hard-coded path --- internal/smtp/http.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/internal/smtp/http.go b/internal/smtp/http.go index 9d8307b..b8b7917 100644 --- a/internal/smtp/http.go +++ b/internal/smtp/http.go @@ -6,7 +6,6 @@ import ( "fmt" "html/template" "net/http" - "os" "path" "regexp" "strconv" @@ -225,19 +224,6 @@ func (h *smtpHTTPHandler) handleGUIMessage(w http.ResponseWriter, r *http.Reques return } - // TODO: For local testing only - remove before commit - - src, err := os.ReadFile("/home/work/Repositories/apitest/internal/smtp/gui_message.html") - if err != nil { - panic(err) - } - - guiMessageTemplate = template.Must(template. - New("gui_message"). - Funcs(sprig.TxtFuncMap()). - Parse(string(src)), - ) - err = guiMessageTemplate.Execute(w, map[string]any{ "prefix": h.prefix, "metadata": metadata,