Browse Source

Add boundary.rect to geo_autocomplete sanitizer

pull/703/head
Julian Simioni 8 years ago
parent
commit
7f3e7df505
No known key found for this signature in database
GPG Key ID: B9EEB0C6EE0910A1
  1. 2
      sanitizer/_geo_autocomplete.js

2
sanitizer/_geo_autocomplete.js

@ -1,5 +1,6 @@
var geo_common = require ('./_geo_common'); var geo_common = require ('./_geo_common');
var LAT_LON_IS_REQUIRED = false; var LAT_LON_IS_REQUIRED = false;
var RECT_IS_REQUIRED = false;
// validate inputs, convert types and apply defaults // validate inputs, convert types and apply defaults
module.exports = function sanitize( raw, clean ){ module.exports = function sanitize( raw, clean ){
@ -9,6 +10,7 @@ module.exports = function sanitize( raw, clean ){
try { try {
geo_common.sanitize_point( 'focus.point', clean, raw, LAT_LON_IS_REQUIRED ); geo_common.sanitize_point( 'focus.point', clean, raw, LAT_LON_IS_REQUIRED );
geo_common.sanitize_rect( 'boundary.rect', clean, raw, RECT_IS_REQUIRED );
} }
catch (err) { catch (err) {
messages.errors.push( err.message ); messages.errors.push( err.message );

Loading…
Cancel
Save