Merge remote-tracking branch 'origin/dev/guerby' into dev/cedric
This commit is contained in:
@@ -36,6 +36,7 @@ func HandleLogin(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
body, err := io.ReadAll(r.Body)
|
||||
fmt.Println(body)
|
||||
if err != nil {
|
||||
core.JSONError{
|
||||
Status: core.Error,
|
||||
|
||||
@@ -19,7 +19,8 @@ func HandleCreateUser(w http.ResponseWriter, r *http.Request) {
|
||||
}.Respond(w, http.StatusNotAcceptable)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
log.Println("body : ", body )
|
||||
var user core.User
|
||||
err = json.Unmarshal(body, &user)
|
||||
if err != nil {
|
||||
@@ -30,7 +31,7 @@ func HandleCreateUser(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Println(user)
|
||||
log.Println("User : ", user)
|
||||
|
||||
res, err := user.Insert(context.Background())
|
||||
log.Println(res)
|
||||
|
||||
Reference in New Issue
Block a user