From 5ea73bbfba2f48659346f9e5f6aae9b4b618daa9 Mon Sep 17 00:00:00 2001 From: pep Date: Fri, 24 Jul 2020 00:33:16 +0000 Subject: good --- bucky/app/bucky.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bucky/app/bucky.js') 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( -- cgit v1.2.3-70-g09d2