Revision 63071
Added by Katerina Iatropoulou 3 months ago
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/java/eu/dnetlib/data/search/web/api/SearchApiService.java | ||
---|---|---|
1355 | 1355 |
|
1356 | 1356 |
if (sizeExceeded(limit)) { |
1357 | 1357 |
return Response.status(Response.Status.BAD_REQUEST). |
1358 |
entity(APIResponseFormatter.compose400Message(responseType, "The returned results cannot be more than 10.")).
|
|
1358 |
entity(APIResponseFormatter.compose400Message(responseType, "The returned results cannot be more than 50.")).
|
|
1359 | 1359 |
type(responseType).build(); |
1360 | 1360 |
} |
1361 | 1361 |
|
... | ... | |
1477 | 1477 |
|
1478 | 1478 |
if (sizeExceeded(limit)) { |
1479 | 1479 |
return Response.status(Response.Status.BAD_REQUEST). |
1480 |
entity(APIResponseFormatter.compose400Message(responseType, "The returned results cannot be more than 10.")).
|
|
1480 |
entity(APIResponseFormatter.compose400Message(responseType, "The returned results cannot be more than 50.")).
|
|
1481 | 1481 |
type(responseType).build(); |
1482 | 1482 |
} |
1483 | 1483 |
|
... | ... | |
1836 | 1836 |
|
1837 | 1837 |
|
1838 | 1838 |
public boolean sizeExceeded(int limit) { |
1839 |
if(limit > 10) {
|
|
1839 |
if(limit > 50) {
|
|
1840 | 1840 |
return true; |
1841 | 1841 |
} |
1842 | 1842 |
return false; |
Also available in: Unified diff
need to fall back to 50 max results.