Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Limit Top Posts Count in Discourse Module #73

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

samad-yar-khan
Copy link
Contributor

@samad-yar-khan samad-yar-khan commented Feb 5, 2022

Proposed changes (including videos or screenshots)

  • Made changes in the discourse module so that only the top N entries are stored in the CMS.
  • Included checks to make sure that the same TopPost does not populate the database.
  • On Every Call the excess old posts will be deleted and new fresh TopPost will be added.

Issue(s)

Fixes : #21

@samad-yar-khan
Copy link
Contributor Author

samad-yar-khan commented Feb 5, 2022

@RonLek @Sing-Li I have made the changes and have locally tested updating the data (with some dummy data) to maintain the top N posts only. Have also made sure that if the same post is fetched again, then it is not stored again in database. By default strapi will fetch posts in the order in which they are created. Hence, we delete the first X excess/stale posts and add our new TopPost to the CMS database after that. Let me know if there are any changes 😄

@samad-yar-khan samad-yar-khan changed the title [FIX] Top Post Count Discourse Module [FIX] Limit Top Posts Count in Discourse Module Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TODO: Fix the Discourse Module
1 participant