From 5ea73bbfba2f48659346f9e5f6aae9b4b618daa9 Mon Sep 17 00:00:00 2001 From: pep Date: Fri, 24 Jul 2020 00:33:16 +0000 Subject: good --- bucky/app/api.js | 2 +- bucky/app/bucky.js | 4 ++-- bucky/app/privacy.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bucky/app') diff --git a/bucky/app/api.js b/bucky/app/api.js index d2472c3..8840fa0 100644 --- a/bucky/app/api.js +++ b/bucky/app/api.js @@ -186,8 +186,8 @@ function route (app){ privacy.checkThreadPrivacy, multer.array("files"), bucky.verifyFilesOrComment, - bucky.createOptionalComment, bucky.createOptionalFiles, + bucky.createOptionalComment, bucky.bumpThreadRevisions, function(req, res){ res.json({ diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index ab153f9..47026a8 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -413,7 +413,7 @@ var bucky = module.exports = { }) }, createOptionalComment: function(req, res, next){ - if (! req.body.comment || ! req.body.comment.length) { + if (! req.body.comment || ! req.body.comment.length ) { return next() } bucky.createComment(req, res, next) @@ -514,7 +514,7 @@ var bucky = module.exports = { privacy: false, storage: process.env.S3_BUCKET, } - req.body.comment = url+"\n"+file.originalname + req.body.comment = (req.body.comment.length) ? req.body.comment + "
\n" + url + "\n" + file.originalname : url+"\n"+file.originalname db.createFile(data).then(function(file){ resolve(file) }).catch( (err) => reject(err) ).then( diff --git a/bucky/app/privacy.js b/bucky/app/privacy.js index fb1fcd1..86f2475 100644 --- a/bucky/app/privacy.js +++ b/bucky/app/privacy.js @@ -47,4 +47,4 @@ var privacy = module.exports = { }) next() }, -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2