Adds limit = 0 as a valid parameter for queries (#1493)
* Remove results if limit = 0; * Adds tests for limit=0 and count=1. * Improves readability.
This commit is contained in:
@@ -23,7 +23,7 @@ export class ClassesRouter extends PromiseRouter {
|
||||
if (body.skip) {
|
||||
options.skip = Number(body.skip);
|
||||
}
|
||||
if (body.limit) {
|
||||
if (body.limit || body.limit === 0) {
|
||||
options.limit = Number(body.limit);
|
||||
} else {
|
||||
options.limit = Number(100);
|
||||
|
||||
Reference in New Issue
Block a user