File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
modules/ROOT/partials/configuration Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,15 @@ const currentUser = {
3737};
3838
3939const tinycomments_fetch_author_info = (_, done) => {
40- setTimeout(() => done({
41- author: currentUser.id, // Maps to the `author` field in the comment object
42- authorName: currentUser.fullName, // Maps to the `authorName` field in the comment object
43- authorAvatar: currentUser.image, // Maps to the `authorAvatar` field in the comment object
44- }), fakeDelay);
40+ fetch('https://example.api.com/currentUser')
41+ .then(res => res.json())
42+ .then(currentUser => {
43+ done({
44+ author: currentUser.id, // Maps to the `author` field in the comment object
45+ authorName: currentUser.fullName, // Maps to the `authorName` field in the comment object
46+ authorAvatar: currentUser.image, // Maps to the `authorAvatar` field in the comment object
47+ });
48+ });
4549};
4650
4751tinymce.init({
You can’t perform that action at this time.
0 commit comments