|
|
@@ -14,10 +14,10 @@ module.exports = function(crowi) {
|
|
|
commentPosition: { type: Number, default: -1 },
|
|
|
createdAt: { type: Date, default: Date.now },
|
|
|
isMarkdown: { type: Boolean, default: false },
|
|
|
- // replyTo: { type: ObjectId, default: null },
|
|
|
+ replyTo: { type: ObjectId, default: undefined },
|
|
|
});
|
|
|
|
|
|
- commentSchema.statics.create = function(pageId, creatorId, revisionId, comment, position, isMarkdown /* , replyTo */) {
|
|
|
+ commentSchema.statics.create = function(pageId, creatorId, revisionId, comment, position, isMarkdown, replyTo) {
|
|
|
const Comment = this;
|
|
|
|
|
|
return new Promise(((resolve, reject) => {
|
|
|
@@ -29,7 +29,7 @@ module.exports = function(crowi) {
|
|
|
newComment.comment = comment;
|
|
|
newComment.commentPosition = position;
|
|
|
newComment.isMarkdown = isMarkdown || false;
|
|
|
- // newComment.replyTo = replyTo || null;
|
|
|
+ newComment.replyTo = replyTo;
|
|
|
|
|
|
newComment.save((err, data) => {
|
|
|
if (err) {
|