Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintWish committed May 16, 2023
1 parent 9ac102c commit 605de25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/character.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (c *controller) PostCharacter(w http.ResponseWriter, r *http.Request) {
if err := json.NewDecoder(r.Body).Decode(&newChar); err != nil {
var buf bytes.Buffer
if size, err := io.Copy(&buf, r.Body); err != nil {
c.App.LogAPI.Errorf("failed to copy body: %w copied (%d) expected (%d)", err, size, r.ContentLength)
c.App.LogAPI.Errorf("failed to copy body: %s copied (%d) expected (%d)", err, size, r.ContentLength)
response.BadRequest(w, err)
return
}
Expand Down Expand Up @@ -197,7 +197,7 @@ func (c *controller) PutCharacter(w http.ResponseWriter, r *http.Request) {
if err := json.NewDecoder(r.Body).Decode(&updateChar); err != nil {
var buf bytes.Buffer
if size, err := io.Copy(&buf, r.Body); err != nil {
c.App.LogAPI.Errorf("failed to copy body: %w copied (%d) expected (%d)", err, size, r.ContentLength)
c.App.LogAPI.Errorf("failed to copy body: %s copied (%d) expected (%d)", err, size, r.ContentLength)
response.BadRequest(w, err)
return
}
Expand Down

0 comments on commit 605de25

Please sign in to comment.