Commit 7e32e6ad authored by shajiaiming's avatar shajiaiming

fix

parent 118814fa
...@@ -7,7 +7,6 @@ import ( ...@@ -7,7 +7,6 @@ import (
"bwallet/service/auth_service" "bwallet/service/auth_service"
"bwallet/service/coin_service" "bwallet/service/coin_service"
"bwallet/validate_service" "bwallet/validate_service"
"fmt"
"github.com/Unknwon/com" "github.com/Unknwon/com"
"github.com/astaxie/beego/validation" "github.com/astaxie/beego/validation"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
...@@ -118,7 +117,6 @@ func GetCoins(c *gin.Context) { ...@@ -118,7 +117,6 @@ func GetCoins(c *gin.Context) {
func AddCoin(c *gin.Context) { func AddCoin(c *gin.Context) {
coin := validate_service.Coin{} coin := validate_service.Coin{}
c.ShouldBindJSON(&coin) c.ShouldBindJSON(&coin)
fmt.Println(coin)
//方法一 //方法一
if ok, errors := validate_service.ValidateInputs(coin); !ok { if ok, errors := validate_service.ValidateInputs(coin); !ok {
for _, err := range errors { for _, err := range errors {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment