Browse Source

id fix, formatting

pull/38/head
Peter Johnson 10 years ago
parent
commit
e4496763ad
  1. 8
      controller/suggest.js

8
controller/suggest.js

@ -68,7 +68,7 @@ function setup( backend, query ){
return {
_index: 'pelias',
_type: idParts[0],
_id: idParts[1]
_id: idParts.slice(1).join(':')
};
});
@ -89,7 +89,7 @@ function setup( backend, query ){
// admin only
req.admin = {};
for (k in req.clean) { req.admin[k] = req.clean[k] }
for (var k in req.clean) { req.admin[k] = req.clean[k]; }
req.admin.layers = ['admin0','admin1','admin2'];
if (req.clean.input.length < 4 && isNaN(parseInt(req.clean.input, 10))) {
@ -106,7 +106,7 @@ function setup( backend, query ){
cmd.body = query( req.clean, 3 );
query_backend(cmd, callback);
}
}
};
} else {
async_query = {
all_5p: function(callback){
@ -125,7 +125,7 @@ function setup( backend, query ){
cmd.body = query( req.admin );
query_backend(cmd, callback);
}
}
};
}
async.parallel(async_query, function(err, results) {

Loading…
Cancel
Save