作者 yangfu

基础路由修改

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