don't override other options with default values when updating
Ted Unangst tedu@tedunangst.com
Sat, 23 Nov 2019 16:57:28 -0500
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
web.go
→
web.go
@@ -1064,13 +1064,18 @@
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 {