作者 yangfu

基础路由修改

... ... @@ -25,6 +25,11 @@ func init() {
)
beego.AddNamespace(nsV1)
nsV2 := beego.NewNamespace("v2",
beego.NSNamespace("user", beego.NSBefore(controllers.FilterComm), beego.NSInclude(&v1.UserController{})),
)
beego.AddNamespace(nsV2)
nsH5 := beego.NewNamespace("h5", beego.NSBefore(controllers.LogRequestData), beego.NSBefore(controllers.AllowOption), beego.NSInclude(&controllers.H5Controller{}))
beego.AddNamespace(nsH5)
... ...
... ... @@ -181,7 +181,7 @@ func UpdateDevice(header *protocol.RequestHeader, request *protocol.UpdateDevice
userAuth *models.UserAuth
updateMap = make(map[string]interface{})
)
if userAuth, err = models.GetUserAuthByUserId(header.Uid, header.DeviceType); err != nil {
if userAuth, err = models.GetUserAuthByUserId(header.Uid, protocol.DeviceType); err != nil {
log.Error(err)
return
}
... ...