mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 14:18:12 +00:00
fixed multipart form issue
This commit is contained in:
@@ -24,7 +24,7 @@ func NewTransactionTypeController(as *services.TransactionTypeService, s *gin.Ro
|
||||
|
||||
func (wc *TransactionTypeController) New(c *gin.Context) {
|
||||
body := new(models.NewTransactionTypeBody)
|
||||
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