From 136d895d155f28c2e75b3af206549acaa2a354ed Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Mon, 15 Feb 2021 09:42:51 +0100 Subject: Linter: Fix all lint errors Signed-off-by: Philip Molares --- lib/web/userRouter.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/web/userRouter.js') diff --git a/lib/web/userRouter.js b/lib/web/userRouter.js index f1f999f1..117668fa 100644 --- a/lib/web/userRouter.js +++ b/lib/web/userRouter.js @@ -21,7 +21,7 @@ UserRouter.get('/me', function (req, res) { } }).then(function (user) { if (!user) { return errors.errorNotFound(res) } - var profile = models.User.getProfile(user) + const profile = models.User.getProfile(user) res.send({ status: 'ok', id: req.user.id, @@ -70,7 +70,7 @@ UserRouter.get('/me/delete/:token?', function (req, res) { UserRouter.get('/me/export', function (req, res) { if (req.isAuthenticated()) { // let output = fs.createWriteStream(__dirname + '/example.zip'); - let archive = archiver('zip', { + const archive = archiver('zip', { zlib: { level: 3 } // Sets the compression level. }) res.setHeader('Content-Type', 'application/zip') @@ -90,13 +90,13 @@ UserRouter.get('/me/export', function (req, res) { ownerId: user.id } }).then(function (notes) { - let filenames = {} + const filenames = {} async.each(notes, function (note, callback) { - let basename = note.title.replace(/\//g, '-') // Prevent subdirectories + const basename = note.title.replace(/\//g, '-') // Prevent subdirectories let filename let suffix = '' do { - let seperator = typeof suffix === 'number' ? '-' : '' + const seperator = typeof suffix === 'number' ? '-' : '' filename = basename + seperator + suffix + '.md' suffix++ } while (filenames[filename]) -- cgit v1.2.3