go-common/app/interface/main/app-feed/http/cache.go

21 lines
419 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"encoding/json"
"go-common/app/interface/main/app-card/model/card/ai"
"go-common/library/ecode"
bm "go-common/library/net/http/blademaster"
)
func upRcmd(c *bm.Context) {
params := c.Request.Form
item := params.Get("item")
var is []*ai.Item
if err := json.Unmarshal([]byte(item), &is); err != nil {
c.JSON(nil, ecode.RequestErr)
return
}
c.JSON(nil, feedSvc.UpRcmdCache(c, is))
}