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

Refactoring code to reduce level of nesting (Project 1) #16

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

philliparaujo
Copy link

Description

The chat.js file has a function openChat that has many levels of nesting due to asynchronous functions and API calls. This PR reduces a specific instance of this nesting, which starts at the api.get('chats/${roomId}') call, by having earlier code return early and remove the need for an else statement.

@philliparaujo
Copy link
Author

@philliparaujo
Copy link
Author

Pull Request Test Coverage Report for Build 10694364476

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.671%

Totals Coverage Status
Change from base Build 10607818019: 0.0%
Covered Lines: 22323
Relevant Lines: 25582

💛 - Coveralls

Originally posted by @coveralls in CMU-313/NodeBB#461 (comment)

@philliparaujo philliparaujo marked this pull request as ready for review September 23, 2024 00:15
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10985536556

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.03%) to 82.671%

Files with Coverage Reduction New Missed Lines %
src/groups/join.js 1 92.05%
src/user/reset.js 3 87.5%
src/user/approval.js 3 87.61%
Totals Coverage Status
Change from base Build 10985395347: -0.03%
Covered Lines: 22323
Relevant Lines: 25582

💛 - Coveralls

@philliparaujo philliparaujo merged commit c0c83be into f24 Sep 23, 2024
1 check passed
@philliparaujo philliparaujo added this to the Sprint 1 milestone Sep 25, 2024
@philliparaujo philliparaujo deleted the phillip-project1 branch October 10, 2024 18:47
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.

2 participants