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

Reducing cognitive overload in src/controllers/helpers.js #27

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

aattiyah
Copy link

I refactored the code in this file to reduce its cognitive complexity from 20 to the 15 allowed. I did this by adding a helper function handleSuccessfulResponse.

Copy link

@akobaidan akobaidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks correct, concise and tested.

Copy link

@tatougueye tatougueye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aattiyah aattiyah merged commit ce28d94 into f24 Sep 18, 2024
1 check passed
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.

3 participants