summaryrefslogtreecommitdiff
path: root/bucky/app/router.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-11 10:34:34 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-11 10:34:34 +0100
commit3aad9b4b70921e9be670560f42f00dcd448e27bb (patch)
treee43bb3ab6ffd38492c6ca1c733c74e51443491ef /bucky/app/router.js
parentd56452cd8c61cf463cd1bfbb5488dfc2f7387175 (diff)
bumpViewCount and revisions
Diffstat (limited to 'bucky/app/router.js')
-rw-r--r--bucky/app/router.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js
index 8ff9d87..ac176bc 100644
--- a/bucky/app/router.js
+++ b/bucky/app/router.js
@@ -85,6 +85,7 @@ module.exports = function(app){
bucky.ensureKeywordForThread,
bucky.ensureCommentsForThread,
bucky.ensureFilesForThread,
+ bucky.bumpViewCount,
function(req, res){
res.json({
thread: res.thread,
@@ -111,6 +112,7 @@ module.exports = function(app){
bucky.verifyFilesOrComment,
bucky.createOptionalFiles,
bucky.createOptionalComment,
+ bucky.bumpThreadRevisions,
function(req, res){
res.json({
comment: res.comment
@@ -127,7 +129,9 @@ module.exports = function(app){
middleware.ensureAuthenticated,
bucky.ensureComment,
bucky.checkCommentPrivacy,
+ bucky.ensureCommentThread,
bucky.updateComment,
+ bucky.bumpThreadRevisions,
function(req, res){
res.json({ comment: res.comment })
})