Skip to content

Refactored code in src/api/posts.js by adding a helper function#105

Open
Procos12 wants to merge 1 commit into
CMU-17313Q:f24from
Procos12:f24
Open

Refactored code in src/api/posts.js by adding a helper function#105
Procos12 wants to merge 1 commit into
CMU-17313Q:f24from
Procos12:f24

Conversation

@Procos12
Copy link
Copy Markdown

@Procos12 Procos12 commented Sep 5, 2024

Refactored the function postsAPI.edit starting on line 101, to improve adaptability and reduce its cognitive complexity. This was done by adding a helper function to handle the errors detected in the function postsAPI.edit. The changes were tested by running the linter and testing.

Resolves #85

Refactored the function postsAPI.edit starting on line 101, to improve adaptability and reduce its cognitive complexity.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 5, 2024

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 10725533539

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.005%) to 82.666%

Files with Coverage Reduction New Missed Lines %
src/meta/errors.js 1 76.74%
Totals Coverage Status
Change from base Build 10550029021: -0.005%
Covered Lines: 22323
Relevant Lines: 25583

💛 - Coveralls

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/api/posts.js

2 participants