Skip to content

Commit

Permalink
增加注册接口
Browse files Browse the repository at this point in the history
  • Loading branch information
hehanpeng committed Jun 4, 2021
1 parent d465ec3 commit 335b57c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions waf-srv/api/v1/ttoInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,12 @@ func RegisterTto(c *gin.Context) {
func CancelTto(c *gin.Context) {
var cancelTto request.CancelTto
_ = c.ShouldBindJSON(&cancelTto)
util.Verify(cancelTto, util.IdVerify)
if err := service.CancelTto(cancelTto.ID); err != nil {
err := util.Verify(cancelTto, util.IdVerify)
if err != nil {
api.FailWithMessage(err.Error(), c)
return
}
if err = service.CancelTto(cancelTto.ID); err != nil {
invoker.Logger.Error("注销失败!", zap.Any("err", err))
api.FailWithMessage("注销失败", c)
} else {
Expand Down

0 comments on commit 335b57c

Please sign in to comment.