From 3c029c95630b1cb9f7bbf57471759bf4ba5b3f3c Mon Sep 17 00:00:00 2001 From: fungal Date: Mon, 18 Dec 2023 12:56:51 +0100 Subject: [PATCH] also submit emoji url --- main.go | 3 +++ templates/index.html | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index ddafb0a..6752d50 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( type EmojiDetails struct { Label string + Url string } //go:embed templates @@ -24,9 +25,11 @@ func handleForm(w http.ResponseWriter, r *http.Request) { details := EmojiDetails{ Label: r.FormValue("label"), + Url: r.FormValue("url"), } log.Print(details.Label) + log.Print(details.Url) tmpl.Execute(w, struct{ Success bool }{true}) } diff --git a/templates/index.html b/templates/index.html index dadd7d2..a654838 100644 --- a/templates/index.html +++ b/templates/index.html @@ -20,10 +20,14 @@ {{end}}

Request An Emoji

- - - - +
+ + +
+
+ + +