mirror of
https://github.com/beego/bee.git
synced 2024-10-31 18:50:54 +00:00
commit
54229fea6f
@ -1262,7 +1262,7 @@ func (c *{{ctrlName}}Controller) GetAll() {
|
||||
// query: k:v,k:v
|
||||
if v := c.GetString("query"); v != "" {
|
||||
for _, cond := range strings.Split(v, ",") {
|
||||
kv := strings.Split(cond, ":")
|
||||
kv := strings.SplitN(cond, ":", 2)
|
||||
if len(kv) != 2 {
|
||||
c.Data["json"] = errors.New("Error: invalid query key/value pair")
|
||||
c.ServeJSON()
|
||||
|
Loading…
Reference in New Issue
Block a user