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

Refactored code in src/upgrades/1.1.0/user_post_count_per_tid.js #29

Open
wants to merge 5 commits into
base: f24
Choose a base branch
from

Conversation

mthani2
Copy link

@mthani2 mthani2 commented Sep 1, 2024

Refactored the code to reduce the maximum depth of nesting.

Restructured the code to simplify the nested callback structure for updating user post counts per topic identifier (tid), reducing complexity. This was done by simplifying the arrangement of functions and improving readability without changing the core functionality.
The async.each and async.eachSeries functions, were maintained but their syntax and structure were cleaned up to reduce redundancy (solving the maximum depth issue).
The function now works under a single method (directly assigned in the module.exports,) replacing the separate assignment of the action function.

Resolves #28

@mthani2 mthani2 changed the title Extracted nested function out of outer function Refactored code in src/upgrades/1.1.0/user_post_count_per_tid.js Sep 1, 2024
Copy link

sonarcloud bot commented Sep 4, 2024

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.

Refactoring code in src/upgrades/1.1.0/user_post_count_per_tid.js
1 participant