From d0ec9f38b17dadf4c244904e28e064d6ad7c5674 Mon Sep 17 00:00:00 2001 From: GrailFinder Date: Wed, 29 May 2024 08:42:36 +0300 Subject: Feat: add recommendations [wip] --- internal/handlers/elements.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'internal/handlers/elements.go') diff --git a/internal/handlers/elements.go b/internal/handlers/elements.go index 62c632b..965281a 100644 --- a/internal/handlers/elements.go +++ b/internal/handlers/elements.go @@ -22,3 +22,21 @@ func (h *Handlers) ServeHideForm(w http.ResponseWriter, r *http.Request) { } tmpl.ExecuteTemplate(w, "showformbtn", nil) } + +func (h *Handlers) ShowRecommended(w http.ResponseWriter, r *http.Request) { + tmpl, err := template.ParseGlob("components/*.html") + if err != nil { + abortWithError(w, err.Error()) + return + } + tmpl.ExecuteTemplate(w, "showformbtn", nil) +} + +func (h *Handlers) HideRecommended(w http.ResponseWriter, r *http.Request) { + tmpl, err := template.ParseGlob("components/*.html") + if err != nil { + abortWithError(w, err.Error()) + return + } + tmpl.ExecuteTemplate(w, "showformbtn", nil) +} -- cgit v1.2.3