UNPKG

xena

Version:

eXtended Elasticsearch Node Angular - Create applications using Hapi, Elasticsearch, Node.js, AngularJS

17 lines (14 loc) 361 B
'use strict'; import <%= _.capitalize(_.humanize(name)) %> from './<%= name %>.object'; export default { method: 'POST', path: '/stories', handler: (req, res) => { var <%= name %> = new <%= _.capitalize(_.humanize(name)) %>(); return <%= name %> .import(req.payload) .call('save') .then(res => res(res).code(200)) ; } };