Skip to content

Commit

Permalink
Parse if not null
Browse files Browse the repository at this point in the history
  • Loading branch information
eswdd committed Jan 5, 2023
1 parent 22c5d72 commit ca8eb4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ var parseSearchLookupQuery = function(query, callback) {
};

var searchLookupImpl = function(query, limit, useMeta, res) {
if (limit != null) {
limit = parseInt(limit);
}
if (!backend.searchLookupImpl) {
handleErr({code:501,message:"Searching not supported by this backend"});
return;
Expand Down Expand Up @@ -225,7 +228,7 @@ var searchLookupPost = function(req, res) {

var searchLookupGet = function(req, res) {
var queryParams = req.query;
searchLookupImpl(queryParams["m"], parseInt(queryParams["limit"]), queryParams["use_meta"], res);
searchLookupImpl(queryParams["m"], queryParams["limit"], queryParams["use_meta"], res);
};

var uidMetaGet = function(req, res) {
Expand Down

0 comments on commit ca8eb4c

Please sign in to comment.