flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit 44cc1a7b899a44c84d0f2d87e95d46571c8c9abd
parent 58a76b756308ca8920f3091d35caf8220605f3da
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat,  9 Jan 2021 17:47:21 -0800

fix

Diffstat:
Mgemini.go | 2+-
Mhttp.go | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gemini.go b/gemini.go @@ -85,7 +85,7 @@ func gmiPage(w *gmi.ResponseWriter, r *gmi.Request) { if custom != "" { userName = custom } else { - userName := filepath.Clean(strings.Split(r.URL.Host, ".")[0]) // clean probably unnecessary + userName = filepath.Clean(strings.Split(r.URL.Host, ".")[0]) // clean probably unnecessary } fileName := filepath.Clean(r.URL.Path) if fileName == "/" { diff --git a/http.go b/http.go @@ -301,7 +301,7 @@ func myAccountHandler(w http.ResponseWriter, r *http.Request) { newDomain := r.Form.Get("domain") newUsername = strings.ToLower(newUsername) var err error - _, exists := dict[newDomain] + _, exists := domains[newDomain] if newDomain != me.Domain && !exists { _, err = DB.Exec("update user set domain = ? where username = ?", newDomain, me.Username) // TODO use transaction if err != nil {