go-common/app/interface/openplatform/article/http/cards.go
2019-04-22 18:49:16 +08:00

24 lines
404 B
Go

package http
import (
"go-common/library/ecode"
bm "go-common/library/net/http/blademaster"
"strings"
)
func card(c *bm.Context) {
c.JSON(artSrv.FindCard(c, c.Request.Form.Get("id")))
}
func cards(c *bm.Context) {
var (
params = c.Request.Form
)
ids := strings.Split(params.Get("ids"), ",")
if len(ids) > 100 {
c.JSON(nil, ecode.RequestErr)
return
}
c.JSON(artSrv.FindCards(c, ids))
}