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.
25 lines
483 B
25 lines
483 B
package http |
|
|
|
import ( |
|
"go-common/library/ecode" |
|
bm "go-common/library/net/http/blademaster" |
|
) |
|
|
|
// get history |
|
func history(c *bm.Context) { |
|
v := new(struct { |
|
AccessKey string `form:"access_key"` |
|
}) |
|
if err := c.Bind(v); err != nil { |
|
return |
|
} |
|
if v.AccessKey == "" { |
|
c.JSON(nil, ecode.NoLogin) |
|
return |
|
} |
|
if mid, ok := c.Get("mid"); !ok { // if not login, we don't call follow data |
|
c.JSON(nil, ecode.NoLogin) |
|
} else { |
|
c.JSON(hisSvc.GetHistory(c, mid.(int64))) |
|
} |
|
}
|
|
|