|
@@ -41,6 +41,13 @@ func Login(w http.ResponseWriter, r *http.Request) {
|
|
http.Error(w, err.Error(), 500)
|
|
http.Error(w, err.Error(), 500)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- fmt.Fprint(w, usr)
|
|
|
|
|
|
+ log.Printf("Parse User login.", usr)
|
|
|
|
+ bty, err := json.Marshal(usr)
|
|
|
|
+ if err != nil {
|
|
|
|
+ log.Printf("[ERROR] Marshal %s.", err.Error())
|
|
|
|
+ http.Error(w, err.Error(), 500)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ fmt.Fprint(w, bty)
|
|
log.Printf("End login.")
|
|
log.Printf("End login.")
|
|
}
|
|
}
|