fix: lint

Signed-off-by: acalcutt <acalcutt@techidiots.net>
This commit is contained in:
acalcutt 2023-11-02 11:44:17 -04:00 committed by Andrew Calcutt
parent 426038a713
commit 70d8ddc476
2 changed files with 18 additions and 13 deletions

View file

@ -277,12 +277,16 @@ fs.stat(path.resolve(opts.config), (err, stats) => {
axios({ axios({
url, url,
method: 'GET', method: 'GET',
responseType: 'stream' responseType: 'stream',
}).then(response => { })
.then((response) => {
response.data.pipe(writer); response.data.pipe(writer);
writer.on('finish', () => StartWithInputFile(filename)); writer.on('finish', () => StartWithInputFile(filename));
writer.on('error', err => console.error(`Error writing file: ${err}`)); writer.on('error', (err) =>
}).catch(error => { console.error(`Error writing file: ${err}`),
);
})
.catch((error) => {
console.error(`Error downloading file: ${error}`); console.error(`Error downloading file: ${error}`);
}); });
} }

View file

@ -1364,7 +1364,9 @@ export const serve_rendered = {
const parsedResponse = {}; const parsedResponse = {};
if (responseHeaders['last-modified']) { if (responseHeaders['last-modified']) {
parsedResponse.modified = new Date(responseHeaders['last-modified']); parsedResponse.modified = new Date(
responseHeaders['last-modified'],
);
} }
if (responseHeaders.expires) { if (responseHeaders.expires) {
parsedResponse.expires = new Date(responseHeaders.expires); parsedResponse.expires = new Date(responseHeaders.expires);
@ -1375,7 +1377,6 @@ export const serve_rendered = {
parsedResponse.data = responseData; parsedResponse.data = responseData;
callback(null, parsedResponse); callback(null, parsedResponse);
} catch (error) { } catch (error) {
const parts = url.parse(req.url); const parts = url.parse(req.url);
const extension = path.extname(parts.pathname).toLowerCase(); const extension = path.extname(parts.pathname).toLowerCase();