Skip to content

Commit

Permalink
Merge pull request #89 from vortex14/swagger
Browse files Browse the repository at this point in the history
fixed problem with define request body
  • Loading branch information
vortex14 authored Sep 5, 2023
2 parents 8a11fc8 + 4d843e9 commit 3f0f9f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/servers/gin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ func (s *TyphoonGinServer) onRequestHandler(ginCtx *Gin.Context) {
if action.IsValidRequestBody() {

body := action.GetRequestModel()

err := ginCtx.ShouldBindJSON(body)
data := *&body
err := ginCtx.ShouldBindJSON(data)

if err != nil {
s.LOG.Error(Errors.ActionErrRequestModel.Error())
ginCtx.JSON(422, forms.ErrorResponse{Error: err.Error()})
return
} else {
ginCtx.Set("body", body)
ginCtx.Set("body", data)
}

}
Expand Down

0 comments on commit 3f0f9f3

Please sign in to comment.