You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
601 B
31 lines
601 B
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)) |
|
}
|
|
|