go-common/app/admin/ep/melloi/http/tree.go

32 lines
601 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"go-common/library/ecode"
bm "go-common/library/net/http/blademaster"
)
func queryUserTree(c *bm.Context) {
session, err := c.Request.Cookie("_AJSESSIONID")
if err != nil {
c.JSON(nil, err)
return
}
c.JSON(srv.QueryUserTree(c, session.Value))
}
func queryTreeAdmin(c *bm.Context) {
v := new(struct {
Path string `form:"path"`
})
if err := c.Bind(v); err != nil {
c.JSON(nil, ecode.RequestErr)
return
}
session, err := c.Request.Cookie("_AJSESSIONID")
if err != nil {
c.JSON(nil, err)
return
}
c.JSON(srv.QueryTreeAdmin(c, v.Path, session.Value))
}