Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Removing debug fmt

Cette révision appartient à :
akuma06 2017-05-24 00:23:50 +02:00 révisé par GitHub
Parent 891e385939
révision d35c495d59

Voir le fichier

@ -11,7 +11,6 @@ import (
"github.com/gorilla/context"
"github.com/gorilla/securecookie"
"golang.org/x/crypto/bcrypt"
"fmt"
"net/http"
"strconv"
"time"
@ -124,9 +123,7 @@ func RegisterHandler(w http.ResponseWriter, r *http.Request) (int, error) {
func CurrentUser(r *http.Request) (model.User, error) {
var user model.User
var encoded string
if r == nil {
fmt.Println("ERROR r is terminated")
}
encoded = r.Header.Get("X-Auth-Token")
if len(encoded) == 0 {
// check cookie instead
@ -168,4 +165,4 @@ func getUserFromContext(r *http.Request) model.User {
}
func setUserToContext(r *http.Request, val model.User) {
context.Set(r, UserContextKey, val)
}
}