forbid empty querying scores
This commit is contained in:
parent
daf10b5d71
commit
50ffa4e066
|
@ -76,6 +76,9 @@ func ScoresGET(md common.MethodData) common.CodeMessager {
|
||||||
Table: "scores",
|
Table: "scores",
|
||||||
Allowed: []string{"pp", "score", "accuracy", "id"},
|
Allowed: []string{"pp", "score", "accuracy", "id"},
|
||||||
})
|
})
|
||||||
|
if where.Clause == "" {
|
||||||
|
return ErrMissingField("must specify at least one queried item")
|
||||||
|
}
|
||||||
|
|
||||||
where.Where(` scores.completed = '3' AND `+md.User.OnlyUserPublic(false)+` `+
|
where.Where(` scores.completed = '3' AND `+md.User.OnlyUserPublic(false)+` `+
|
||||||
genModeClause(md)+` `+sort+common.Paginate(md.Query("p"), md.Query("l"), 100), "FIF")
|
genModeClause(md)+` `+sort+common.Paginate(md.Query("p"), md.Query("l"), 100), "FIF")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user