Skip to content

Commit

Permalink
Merge pull request #23 from subomi/subomi-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
subomi committed Mar 27, 2024
2 parents be2e23d + c14d822 commit fb3a6ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ func createUser(r *http.Request, w http.ResponseWriter) {

payload, err := io.ReadAll(r.Body)
if err != nil {
t.Fatal(err)
w.Write("Bad Request")
}

var userObject user
err = json.Unmarshal(payload, &userObject)
if err != nil {
t.Fatal(err)
w.Write("Bad Request")
}

userObject = user{
Expand All @@ -43,7 +43,7 @@ func createUser(r *http.Request, w http.ResponseWriter) {

body, err := json.Marshal(userObject)
if err != nil {
t.Fatal(err)
w.Write("Bad Request")
}

res.SetBody(body)
Expand Down

0 comments on commit fb3a6ee

Please sign in to comment.