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

refactor: improve update category responses♻️ #25

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

shivamvijaywargi
Copy link
Contributor

This pull request includes several changes to the category update functionality in the src/modules/categories module. The most important changes involve refactoring the update process to simplify the code and improve error handling.

Refactoring and simplification:

  • src/modules/categories/category.handlers.ts: Replaced updateCategoryByIdAndUserIdRepository with updateCategoryByIdRepository and added checks to ensure the category exists and the user is authorized to update it. Improved error handling for cases where the category is not found or the update fails. [1] [2]

Repository changes:

Route updates:

@shivamvijaywargi shivamvijaywargi self-assigned this Nov 17, 2024
@shivamvijaywargi shivamvijaywargi added this to the Implement CRUD for category and group milestone Nov 17, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
15.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@shivamvijaywargi shivamvijaywargi merged commit d6990c9 into main Nov 17, 2024
3 of 4 checks passed
@shivamvijaywargi shivamvijaywargi deleted the refactor/category-update-endpoint branch November 17, 2024 11:27
@shivamvijaywargi shivamvijaywargi modified the milestones: Implement CRUD for category and group, V1.0 Nov 27, 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.

1 participant