diff options
| author | pep <yes@peepee.me> | 2020-07-24 00:33:16 +0000 |
|---|---|---|
| committer | pep <yes@peepee.me> | 2020-07-24 00:33:16 +0000 |
| commit | 5ea73bbfba2f48659346f9e5f6aae9b4b618daa9 (patch) | |
| tree | 2d4cf737fe63931651cf1c35bb349fc97cad6b82 /bucky/app/bucky.js | |
| parent | 789dbb1e734885bd7cf5ad25f0d2f47765a13657 (diff) | |
good
Diffstat (limited to 'bucky/app/bucky.js')
| -rw-r--r-- | bucky/app/bucky.js | 4 |
1 files changed, 2 insertions, 2 deletions
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 + "<hr>\n" + url + "\n" + file.originalname : url+"\n"+file.originalname db.createFile(data).then(function(file){ resolve(file) }).catch( (err) => reject(err) ).then( |
