From 2e0bf0147a69b5a7ea162e0956f1315c6cd6ec08 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 23 Nov 2019 16:57:28 -0500 Subject: [PATCH] don't override other options with default values when updating --- web.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web.go b/web.go index 5411f75..950623d 100644 --- a/web.go +++ b/web.go @@ -1064,13 +1064,18 @@ func honkpage(w http.ResponseWriter, u *login.UserInfo, honks []*Honk, templinfo func saveuser(w http.ResponseWriter, r *http.Request) { whatabout := r.FormValue("whatabout") u := login.GetUserInfo(r) + user, _ := butwhatabout(u.Username) db := opendatabase() - var options UserOptions + options := user.Options if r.FormValue("skinny") == "skinny" { options.SkinnyCSS = true + } else { + options.SkinnyCSS = false } if r.FormValue("maps") == "apple" { options.MapLink = "apple" + } else { + options.MapLink = "" } j, err := jsonify(options) if err == nil {