Skip to content

Commit

Permalink
Merge pull request #37 from Tasnim1147/connect-frontend-backend-db
Browse files Browse the repository at this point in the history
Extract annonymoustype as postsFields
  • Loading branch information
jdufitum authored Sep 26, 2024
2 parents a8575f8 + 47b9af5 commit b691f69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
yarn.lock
npm-debug.log


sftp-config.json
config.json
jsconfig.json
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/topics/teaser.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = function (Topics) {
});

const [allPostData, callerSettings] = await Promise.all([
posts.getPostsFields(teaserPids, ['pid', 'uid', 'timestamp', 'tid', 'content']),
posts.getPostsFields(teaserPids, ['pid', 'uid', 'timestamp', 'tid', 'content', 'annonymousType']),
user.getSettings(uid),
]);
let postData = allPostData.filter(post => post && post.pid);
Expand Down Expand Up @@ -142,7 +142,7 @@ module.exports = function (Topics) {
const mainPid = await Topics.getTopicField(postData.tid, 'mainPid');
pids = [mainPid];
}
const prevPosts = await posts.getPostsFields(pids, ['pid', 'uid', 'timestamp', 'tid', 'content']);
const prevPosts = await posts.getPostsFields(pids, ['pid', 'uid', 'timestamp', 'tid', 'content', 'annonymousType']);
isBlocked = prevPosts.every(checkBlocked);
start += postsPerIteration;
stop = start + postsPerIteration - 1;
Expand Down

0 comments on commit b691f69

Please sign in to comment.