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.
23 lines
404 B
23 lines
404 B
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)) |
|
}
|
|
|