Removed callback syntax
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2023-03-08 10:19:02 +01:00
parent 47f1ad9a0c
commit aeb50b2c19
1 changed files with 4 additions and 11 deletions

View File

@ -59,17 +59,10 @@ module.exports = Self => {
}
const writeStream = fs.createWriteStream(filePath);
writeStream.on('open', () => {
response.pipe(writeStream);
});
writeStream.on('error', async error => {
await errorHandler(image.itemFk, error, filePath);
});
writeStream.on('finish', async function() {
writeStream.end();
});
writeStream.on('open', () => response.pipe(writeStream));
writeStream.on('error', async error =>
await errorHandler(image.itemFk, error, filePath));
writeStream.on('finish', writeStream.end());
writeStream.on('close', async function() {
try {