mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-11-11 07:41:10 +00:00
fixed multipart form issue
This commit is contained in:
@@ -25,7 +25,7 @@ func NewWalletsController(as *services.WalletService, s *gin.RouterGroup) *Walle
|
||||
func (wc *WalletsController) New(c *gin.Context) {
|
||||
body := new(models.NewWalletBody)
|
||||
|
||||
if err := c.ShouldBindJSON(body); err != nil {
|
||||
if err := c.ShouldBind(body); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user