Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed validation of ll/near/bounds parameters in search function #19

Merged
merged 1 commit into from

2 participants

@kudrleon

Fixed validation of ll/near/bounds parameters in search function. Allow ll and near to be undefined if ne/sw are provided in the parameter list.

@kudrleon kudrleon Fixed validation of ll/near/bounds parameters in search function
Fixed validation of ll/near/bounds parameters in search function. Allow ll and near to be undefined if ne/sw are provided in the parameter list.
147d595
@clintandrewhall clintandrewhall merged commit 4715b8e into clintandrewhall:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 4, 2013
  1. @kudrleon

    Fixed validation of ll/near/bounds parameters in search function

    kudrleon authored
    Fixed validation of ll/near/bounds parameters in search function. Allow ll and near to be undefined if ne/sw are provided in the parameter list.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/venues.js
View
8 lib/venues.js
@@ -69,9 +69,11 @@ module.exports = function(config) {
if(!lat || !lng) {
if(!near) {
- logger.error('Either lat and lng or near are required as parameters.');
- callback(new Error('Venues.explore: near must be specified if lat and lng are not set.'));
- return;
+ if (!params.ne || !params.sw) {
+ logger.error('Either lat and lng, near, or ne/sw are required as parameters.');
+ callback(new Error('Venues.explore: near or ne/sw must be specified if lat and lng are not set.'));
+ return;
+ }
} else {
params.near = near;
}
Something went wrong with that request. Please try again.