Initial commit of asset queuing (#97)

* Initial commit of asset queuing

* Addresssing comments
This commit is contained in:
Wyatt Johnson
2016-11-28 13:29:39 -05:00
committed by Dan Zajdband
parent c1a7b95705
commit b0f01cf00f
38 changed files with 832 additions and 408 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
const express = require('express');
const Comment = require('../../../models/comment');
const Setting = require('../../../models/setting');
const authorization = require('../../../middleware/authorization');
const router = express.Router();
@@ -13,7 +12,7 @@ const router = express.Router();
// depending on the settings. The :moderation overwrites this settings.
// Pre-moderation: New comments are shown in the moderator queues immediately.
// Post-moderation: New comments do not appear in moderation queues unless they are flagged by other users.
router.get('/comments/pending', authorization.needed('admin'), (req, res, next) => {
router.get('/comments/pending', (req, res, next) => {
Setting.getModerationSetting().then(function({moderation}){
Comment.moderationQueue(moderation).then((comments) => {
res.status(200).json(comments);