rabbah commented on a change in pull request #343: Guard against missing query
parameters.
URL:
https://github.com/apache/incubator-openwhisk-apigateway/pull/343#discussion_r288264134
##########
File path: scripts/lua/management/lib/tenants.lua
##########
@@ -114,7 +114,7 @@ function _M.getTenantAPIs(dataStore, id, queryParams)
end
end
end
- if ((queryParams['skip'] == nil and queryParams['limit'] == nil) or
table.getn(apiList) == 0) then
+ if (((queryParams['skip'] == nil or queryParams['skip'] == 'undefined') and
(queryParams['limit'] == nil or queryParams['limit'] == 'undefined')) or
table.getn(apiList) == 0) then
Review comment:
alternatively, can check if `tonumber` returns nil here which should cover
both parts of the `or`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services