Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handler: (request, reply) => {
const Platform = new Model.Platform(datastore);
const config = request.payload;
const id = Platform.generateId({
name: config.name,
version: config.version
});
const location = urlLib.format({
host: request.headers.host,
port: request.headers.port,
protocol: request.server.info.protocol,
pathname: `${request.path}/${id}`
});
/* eslint-disable consistent-return */
Platform.get(id, (error, data) => {
if (error) {
return reply(boom.wrap(error));
handler: (request, reply) => {
const Platform = new Model.Platform(datastore);
Platform.list(request.query, reply);
},
response: {