diff options
Diffstat (limited to 'bucky/app/bucky.js')
| -rw-r--r-- | bucky/app/bucky.js | 11 |
1 files changed, 4 insertions, 7 deletions
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 + "<hr>\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<hr>" + 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) ) } }) }) |
