Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const cbError = err => {
if (err) {
console.log(err); // eslint-disable-line
const error = new APIError(
'There was a problem getting a signed url',
httpStatus.SERVICE_UNAVAILABLE,
true
);
return next(error);
}
};
signS3(config.aws.profilePicBucketName, fileType, newFileName, cbSuccess, cbError);
const cbError = err => {
if (err) {
console.log(err); // eslint-disable-line
const error = new APIError(
'There was a problem getting a signed url',
httpStatus.SERVICE_UNAVAILABLE,
true
);
return next(error);
}
};
signS3(config.aws.profilePicBucketName, fileType, newFileName, cbSuccess, cbError);
this.server.get(healthUrl, (request: Request, response: Response) => {
const report = healthManager.getReport();
if (healthManager.healthy) {
response.status(httpStatus.OK).send(report);
} else {
response.status(httpStatus.SERVICE_UNAVAILABLE).send(report);
}
});
}