From 041cc4c65a183debd104e3d1c2dc33c32e35042b Mon Sep 17 00:00:00 2001 From: m15o Date: Fri, 26 Nov 2021 23:43:14 +0100 Subject: [PATCH] fix some issues --- web/handler/common.go | 2 +- web/handler/html/common/layout.html | 2 +- web/handler/user_show.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/handler/common.go b/web/handler/common.go index 364ccd0..5d3f796 100644 --- a/web/handler/common.go +++ b/web/handler/common.go @@ -19,7 +19,7 @@ var TplCommonMap = map[string]string{ diff --git a/web/handler/html/common/layout.html b/web/handler/html/common/layout.html index bff5167..deb31a2 100644 --- a/web/handler/html/common/layout.html +++ b/web/handler/html/common/layout.html @@ -14,7 +14,7 @@ diff --git a/web/handler/user_show.go b/web/handler/user_show.go index a99b2e9..dda4cb4 100644 --- a/web/handler/user_show.go +++ b/web/handler/user_show.go @@ -20,6 +20,7 @@ import ( ) func (h *Handler) showUserView(w http.ResponseWriter, r *http.Request) { + logged, _ := h.sess.Get(r) var page int64 = 0 if val, ok := r.URL.Query()["page"]; ok && len(val[0]) == 1 { page, _ = strconv.ParseInt(val[0], 10, 64) @@ -46,7 +47,7 @@ func (h *Handler) showUserView(w http.ResponseWriter, r *http.Request) { "page": page, "next_page": page + 1, "prev_page": page - 1, - }, username) + }, logged) } type statusjson struct {