post 数据返回

This commit is contained in:
meixiongfeng 2023-08-22 10:40:38 +08:00
parent 214d04890e
commit c1b6a6ad15
2 changed files with 6 additions and 2 deletions

View File

@ -24,7 +24,9 @@ func (this *Api_Comp) ActivityNotify(c *engine.Context) {
data interface{} data interface{}
) )
defer c.JSON(http.StatusOK, &Respond{Code: errdata.Code, Message: errdata.Message, Data: data}) defer func() {
c.JSON(http.StatusOK, &Respond{Code: errdata.Code, Message: errdata.Message, Data: data})
}()
if _, err = this.module.service.RpcGo( if _, err = this.module.service.RpcGo(
context.Background(), context.Background(),

View File

@ -40,7 +40,9 @@ func (this *Api_Comp) CreateMail(c *engine.Context) {
} }
return return
} }
defer c.JSON(http.StatusOK, &Respond{Code: errdata.Code, Message: errdata.Message, Data: data}) defer func() {
c.JSON(http.StatusOK, &Respond{Code: errdata.Code, Message: errdata.Message, Data: data})
}()
if sign := gin.ParamSign(this.options.Key, map[string]interface{}{ if sign := gin.ParamSign(this.options.Key, map[string]interface{}{
"uid": req.Uid, "uid": req.Uid,
"title": req.Title, "title": req.Title,