|
|
@@ -161,7 +161,7 @@ module.exports = function(crowi, app) {
|
|
|
const comment = commentForm.comment;
|
|
|
const isMarkdown = commentForm.is_markdown;
|
|
|
const commentId = commentForm.comment_id;
|
|
|
- const creatorId = commentForm.creator_id;
|
|
|
+ const author = commentForm.author;
|
|
|
|
|
|
if (comment === '') {
|
|
|
return res.json(ApiResponse.error('Comment text is required'));
|
|
|
@@ -171,7 +171,7 @@ module.exports = function(crowi, app) {
|
|
|
return res.json(ApiResponse.error('\'comment_id\' is undefined'));
|
|
|
}
|
|
|
|
|
|
- if (creatorId !== req.user.id) {
|
|
|
+ if (author !== req.user.username) {
|
|
|
return res.json(ApiResponse.error('Only the author can edit'));
|
|
|
}
|
|
|
|