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.
18 lines
347 B
18 lines
347 B
package http |
|
|
|
import ( |
|
"go-common/library/ecode" |
|
bm "go-common/library/net/http/blademaster" |
|
) |
|
|
|
// getAuths get user. |
|
func getAuths(c *bm.Context) { |
|
var userName string |
|
username, _ := c.Get("username") |
|
userName, ok := username.(string) |
|
if !ok || userName == "" { |
|
c.JSON(nil, ecode.NoLogin) |
|
return |
|
} |
|
c.JSON(svr.GetAuths(c, userName)) |
|
}
|
|
|