From a7aea69687eb268807aa4a86d9188004fe5cb6c7 Mon Sep 17 00:00:00 2001 From: pep Date: Tue, 28 Jul 2020 21:29:32 +0000 Subject: fixed minor thing --- bucky/app/bucky.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'bucky/app/bucky.js') diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index f104e3b..244b219 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -517,15 +517,12 @@ var bucky = module.exports = { console.log(data) //this library encodes things twice so have to do it yourself url = `http://media.spermwhale.info/bucky/data/${data.thread}/${encodeURI(data.filename)}` - req.body.comment = (req.body.comment.length) ? req.body.comment + "
\n" + url + "\n" + file.originalname : url+"\n"+file.originalname + var comment_footer = url + "\n" + file.originalname + req.body.comment = (req.body.comment) ? req.body.comment + "\n
" + comment_footer : comment_footer db.createFile(data).then(function(file){ + console.log(file) resolve(file) - }).catch( (err) => reject(err) ).then( - function(){ - console.log("about to call createComment") - bucky.createComment(req, res, function(){}) - - }) + }).catch( (err) => reject(err) ) } }) }) -- cgit v1.2.3-70-g09d2