Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
body: JSON.stringify(nodes)
};
console.log("Initialize call response: " + JSON.stringify(data));
callback(null, response);
context.done();
dc.close(); // look at this carefully!!!
}).
catch(error => {
console.log('ERROR', error);
dc.close();
});
}
if (event.pathParameters.proxy.match(/search/ig)) {
g.V().has('name', gremlin.process.P.between(event.queryStringParameters.username, event.queryStringParameters.touser)).limit(20).valueMap(true).toList().then(
data => {
console.log(JSON.stringify(data));
var response = {
statusCode: 200,
headers: headers,
body: JSON.stringify(data)
};
console.log("Search call response: " + JSON.stringify(data));
callback(null, response);
context.done();
dc.close(); // look at this carefully!!!
}).
catch(error => {
console.log('ERROR', error);
dc.close();
});