Skip to content

Commit 7b67ef3

Browse files
author
Rahul Somasundaram
committed
fixed linting
1 parent e5a3b5e commit 7b67ef3

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

backend/internal/certificate.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const internalHost = require('./host');
1313
const letsencryptStaging = process.env.NODE_ENV !== 'production';
1414
const letsencryptConfig = '/etc/letsencrypt.ini';
1515
const certbotCommand = 'certbot';
16-
const archiver = require('archiver');
16+
const archiver = require('archiver');
1717

1818
function omissions() {
1919
return ['is_deleted'];
@@ -336,49 +336,49 @@ const internalCertificate = {
336336
});
337337
},
338338

339-
/**
339+
/**
340340
* @param {Object} data
341341
* @param {Number} data.id
342342
* @returns {Promise}
343343
*/
344-
download: (data) => {
345-
const downloadName = "npm-" + data.id + "-" + `${Date.now()}.zip`;
346-
const opName = '/tmp/' + downloadName;
347-
const zipDirectory = "/etc/letsencrypt/live/npm-" + data.id
344+
download: (data) => {
345+
const downloadName = 'npm-' + data.id + '-' + `${Date.now()}.zip`;
346+
const opName = '/tmp/' + downloadName;
347+
const zipDirectory = '/etc/letsencrypt/live/npm-' + data.id;
348348

349-
return new Promise((resolve, reject) => {
350-
internalCertificate.zipDirectory(zipDirectory, opName)
351-
.then(() => {
352-
logger.debug("zip completed : ", opName)
353-
const resp = {
354-
fileName: opName
355-
}
356-
resolve(resp)
357-
}).catch(err => {
358-
reject(err)
359-
})
360-
});
361-
},
349+
return new Promise((resolve, reject) => {
350+
internalCertificate.zipDirectory(zipDirectory, opName)
351+
.then(() => {
352+
logger.debug('zip completed : ', opName);
353+
const resp = {
354+
fileName: opName
355+
};
356+
resolve(resp);
357+
}).catch((err) => {
358+
reject(err);
359+
});
360+
});
361+
},
362362

363-
/**
363+
/**
364364
* @param {String} source
365365
* @param {String} out
366366
* @returns {Promise}
367367
*/
368-
zipDirectory(source, out) {
369-
const archive = archiver('zip', { zlib: { level: 9 } });
370-
const stream = fs.createWriteStream(out);
368+
zipDirectory(source, out) {
369+
const archive = archiver('zip', { zlib: { level: 9 } });
370+
const stream = fs.createWriteStream(out);
371371

372-
return new Promise((resolve, reject) => {
373-
archive
374-
.directory(source, false)
375-
.on('error', err => reject(err))
376-
.pipe(stream);
372+
return new Promise((resolve, reject) => {
373+
archive
374+
.directory(source, false)
375+
.on('error', (err) => reject(err))
376+
.pipe(stream);
377377

378-
stream.on('close', () => resolve());
379-
archive.finalize();
380-
});
381-
},
378+
stream.on('close', () => resolve());
379+
archive.finalize();
380+
});
381+
},
382382

383383
/**
384384
* @param {Access} access

0 commit comments

Comments
 (0)