- fix bug in cms.GetSelfInfo

This commit is contained in:
gazebo
2018-12-28 11:43:50 +08:00
parent 74b29acd4e
commit 0e84d152c0
2 changed files with 25 additions and 10 deletions

View File

@@ -1,7 +1,6 @@
package controllers
import (
"git.rosy.net.cn/jx-callback/business/jxcallback/auth"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"github.com/astaxie/beego"
)
@@ -46,10 +45,7 @@ func (c *UserController) TmpGetUserInfo() {
// @router /TmpGetSelfInfo [get]
func (c *UserController) TmpGetSelfInfo() {
c.callTmpGetSelfInfo(func(params *tUserTmpGetSelfInfoParams) (retVal interface{}, errCode string, err error) {
tokenInfo, err2 := auth.GetUserInfo(params.Token)
if err = err2; err == nil {
retVal, err = cms.GetSelfInfo(params.Ctx, tokenInfo.ID)
}
retVal, err = cms.GetSelfInfo(params.Ctx)
return retVal, "", err
})
}