Skip to content

Instantly share code, notes, and snippets.

@rotemtam
Created August 25, 2016 21:44
Show Gist options
  • Save rotemtam/64afe7a6385a14b0adab4e84b79fae79 to your computer and use it in GitHub Desktop.
Save rotemtam/64afe7a6385a14b0adab4e84b79fae79 to your computer and use it in GitHub Desktop.
'use strict';
const Repository = require('../../../model/Repository')
, LambdaRunner = require('../../../lib/lambda-co-runner');
function *main(e) {
let query = e.queryParams.q
, res = yield Repository.search(query);
return {items: res.items};
}
module.exports = {
default: LambdaRunner(main)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment