summaryrefslogtreecommitdiff
path: root/bucky/app/bucky.js
diff options
context:
space:
mode:
authorpep <yes@peepee.me>2020-07-28 21:29:32 +0000
committerpep <yes@peepee.me>2020-07-28 21:29:32 +0000
commita7aea69687eb268807aa4a86d9188004fe5cb6c7 (patch)
treed91ffe93b934f5e61cb6aa02e92030e00a5d13f2 /bucky/app/bucky.js
parentd051c6d71f2d2e24ca113f127ff7e0b143d0042a (diff)
fixed minor thing
Diffstat (limited to 'bucky/app/bucky.js')
-rw-r--r--bucky/app/bucky.js11
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) )
}
})
})