diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-22 03:54:31 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-22 03:54:31 -0700 |
commit | 1d2eab63109f2fc4ee2399c47e3aae542e4e9663 (patch) | |
tree | fa38c9c6a435105fa37a1fcd1f0cbf562ef0d06d | |
parent | 45e3a4fa9d946b42a5878733e043519ff88b19ea (diff) |
debugging json content
-rw-r--r-- | system/admin/admin.go | 1 | ||||
-rw-r--r-- | system/admin/user/auth.go | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/system/admin/admin.go b/system/admin/admin.go index 9bf0e9b..bee723b 100644 --- a/system/admin/admin.go +++ b/system/admin/admin.go @@ -329,6 +329,7 @@ func UsersList(req *http.Request) ([]byte, error) { var usr user.User err = json.Unmarshal(j, &usr) if err != nil { + fmt.Println(string(j)) fmt.Println("Unmarshal usr") return nil, err } diff --git a/system/admin/user/auth.go b/system/admin/user/auth.go index 5a2965d..3ff2b2b 100644 --- a/system/admin/user/auth.go +++ b/system/admin/user/auth.go @@ -2,7 +2,6 @@ package user import ( "encoding/base64" - "fmt" "net/http" "github.com/nilslice/jwt" @@ -38,10 +37,8 @@ func Auth(next http.HandlerFunc) http.HandlerFunc { redir := req.URL.Scheme + req.URL.Host + "/admin/login" if IsValid(req) { - fmt.Println("valid") next.ServeHTTP(res, req) } else { - fmt.Println("invalid") http.Redirect(res, req, redir, http.StatusFound) } }) |