Skip to content

Commit

Permalink
refactor: use ShouldBindJSON instead in controller
Browse files Browse the repository at this point in the history
  • Loading branch information
bblueberries committed Dec 24, 2023
1 parent 55b22d5 commit 4489965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/user/user_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (controller *UserController) PostCheckin(ctx *gin.Context) {

//convert request into obj
var requestCheckin domain.Checkin
err := ctx.BindJSON(&requestCheckin)
err := ctx.ShouldBindJSON(&requestCheckin)
if err != nil {
ctx.AbortWithStatusJSON(400,gin.H{
"Message" : "Invalid JSON format",
Expand Down

0 comments on commit 4489965

Please sign in to comment.