Skip to content

Instantly share code, notes, and snippets.

@dgieselaar
Last active September 9, 2019 18:18
Show Gist options
  • Save dgieselaar/9a45bad095fd155110c8eab2c8505514 to your computer and use it in GitHub Desktop.
Save dgieselaar/9a45bad095fd155110c8eab2c8505514 to your computer and use it in GitHub Desktop.
server.route({
url: '/api/metrics/:type',
method: 'GET',
handler: ( request ) => {
const { type } = request.params;
const { start, end } = request.query;
return getMetrics({ type, start, end });
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment