Guest User

Untitled

a guest
Feb 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. server.route({
  2. path: '/api/companies',
  3. method: 'GET',
  4. handler(req, reply) {
  5. Company.find({}, (err, companies) => {
  6. if (err) {
  7. return reply(err).code(404);
  8. }
  9. return reply.response(companies);
  10. })
  11. }
  12. });
Add Comment
Please, Sign In to add comment