|
|
@@ -1,9 +1,8 @@
|
|
|
module.exports = function(crowi, app) {
|
|
|
'use strict';
|
|
|
|
|
|
- var debug = require('debug')('growi:routs:comment')
|
|
|
+ const debug = require('debug')('growi:routs:comment')
|
|
|
, Comment = crowi.model('Comment')
|
|
|
- , User = crowi.model('User')
|
|
|
, Page = crowi.model('Page')
|
|
|
, ApiResponse = require('../util/apiResponse')
|
|
|
, actions = {}
|
|
|
@@ -20,8 +19,8 @@ module.exports = function(crowi, app) {
|
|
|
* @apiParam {String} revision_id Revision Id.
|
|
|
*/
|
|
|
api.get = function(req, res) {
|
|
|
- var pageId = req.query.page_id;
|
|
|
- var revisionId = req.query.revision_id;
|
|
|
+ const pageId = req.query.page_id;
|
|
|
+ const revisionId = req.query.revision_id;
|
|
|
|
|
|
if (revisionId) {
|
|
|
return Comment.getCommentsByRevisionId(revisionId)
|
|
|
@@ -81,7 +80,7 @@ module.exports = function(crowi, app) {
|
|
|
* @apiParam {String} comment_id Comment Id.
|
|
|
*/
|
|
|
api.remove = function(req, res) {
|
|
|
- var commentId = req.body.comment_id;
|
|
|
+ const commentId = req.body.comment_id;
|
|
|
if (!commentId) {
|
|
|
return Promise.resolve(res.json(ApiResponse.error('\'comment_id\' is undefined')));
|
|
|
}
|