fix some issues
This commit is contained in:
parent
755e314a5f
commit
041cc4c65a
3 changed files with 4 additions and 3 deletions
|
|
@ -20,6 +20,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *Handler) showUserView(w http.ResponseWriter, r *http.Request) {
|
func (h *Handler) showUserView(w http.ResponseWriter, r *http.Request) {
|
||||||
|
logged, _ := h.sess.Get(r)
|
||||||
var page int64 = 0
|
var page int64 = 0
|
||||||
if val, ok := r.URL.Query()["page"]; ok && len(val[0]) == 1 {
|
if val, ok := r.URL.Query()["page"]; ok && len(val[0]) == 1 {
|
||||||
page, _ = strconv.ParseInt(val[0], 10, 64)
|
page, _ = strconv.ParseInt(val[0], 10, 64)
|
||||||
|
|
@ -46,7 +47,7 @@ func (h *Handler) showUserView(w http.ResponseWriter, r *http.Request) {
|
||||||
"page": page,
|
"page": page,
|
||||||
"next_page": page + 1,
|
"next_page": page + 1,
|
||||||
"prev_page": page - 1,
|
"prev_page": page - 1,
|
||||||
}, username)
|
}, logged)
|
||||||
}
|
}
|
||||||
|
|
||||||
type statusjson struct {
|
type statusjson struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue