go-common/app/interface/main/web/http/nav.go

23 lines
429 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"go-common/app/interface/main/web/model"
"go-common/library/ecode"
bm "go-common/library/net/http/blademaster"
)
func nav(c *bm.Context) {
var (
rawMid interface{}
ok bool
)
if rawMid, ok = c.Get("mid"); !ok {
// NOTE NoLogin here only for web
c.JSON(model.FailedNavResp{}, ecode.NoLogin)
return
}
mid := rawMid.(int64)
c.JSON(webSvc.Nav(c, mid, c.Request.Header.Get("Cookie")))
}