Skip to content

Commit ede3164

Browse files
committed
DOC-2728: Update tinycomments_reply callback example and demo code.
1 parent 98915b6 commit ede3164

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/ROOT/examples/live-demos/comments-callback/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ const tinycomments_create = (req, done, fail) => {
6969
};
7070

7171
const tinycomments_reply = (req, done) => {
72-
const replyUid = 'annotation-' + randomString();
72+
const commentUid = 'annotation-' + randomString();
7373
conversationDb[req.conversationUid].comments.push({
74-
uid: replyUid,
74+
uid: commentUid,
7575
author: user_id,
7676
authorName: 'James Wilson',
7777
authorAvatar: 'https://sneak-preview.tiny.cloud/demouserdirectory/images/employee_james-wilson_128_52f19412.jpg',
7878
content: req.content,
7979
createdAt: req.createdAt,
8080
modifiedAt: req.createdAt
8181
});
82-
setTimeout(() => done({ commentUid: replyUid }), fakeDelay);
82+
setTimeout(() => done({ commentUid: commentUid }), fakeDelay);
8383
};
8484

8585
const tinycomments_delete = (req, done) => {

modules/ROOT/partials/configuration/tinycomments_reply.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ const reply_comment = (ref, done, fail) => {
4343
return response.json();
4444
})
4545
.then((ref2) => {
46-
let commentUid = ref2.commentUid;
46+
const commentUid = ref2.commentUid;
4747
done({
48-
commentUid: replyUid,
48+
commentUid: commentUid,
4949
author: currentUser.id,
5050
authorName: currentUser.fullName
5151
});

0 commit comments

Comments
 (0)