removing sendFile error catch

This commit is contained in:
bill bittner 2018-05-07 11:03:30 -07:00
parent a82f5990f4
commit 33b96099ad

View file

@ -8,12 +8,7 @@ const serveFile = ({ filePath, fileType }, res) => {
'Content-Type' : fileType || 'image/jpeg',
},
};
res.status(200).sendFile(filePath, sendFileOptions, (error) => {
if (error) {
logger.warn(filePath, error);
res.status(404).send();
}
});
res.status(200).sendFile(filePath, sendFileOptions);
};
module.exports = serveFile;