Skip to content

Feat/126/update the department controller#127

Merged
Kimoo193 merged 12 commits into
mainfrom
feat/126/update-the-department-controller
Apr 9, 2025
Merged

Feat/126/update the department controller#127
Kimoo193 merged 12 commits into
mainfrom
feat/126/update-the-department-controller

Conversation

@Kimoo193
Copy link
Copy Markdown
Contributor

@Kimoo193 Kimoo193 commented Apr 9, 2025

PR Checklist (required)

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation changes
  • Other... Please describe:

Related Issue

Closes #126

@Kimoo193 Kimoo193 linked an issue Apr 9, 2025 that may be closed by this pull request
@Kimoo193 Kimoo193 requested a review from Copilot April 9, 2025 20:53
@Kimoo193 Kimoo193 self-assigned this Apr 9, 2025
@Kimoo193 Kimoo193 added bug Something isn't working feature For new feature labels Apr 9, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/docs/swagger.json: Language not supported

@Kimoo193
Copy link
Copy Markdown
Contributor Author

Kimoo193 commented Apr 9, 2025

This pull request includes several updates and improvements across different parts of the codebase, focusing on user management, department handling, and documentation enhancements.

User Management Changes:

  • Updated src/controllers/user.controller.js to remove encryption for phone numbers during user account updates.
  • Modified src/controllers/user.controller.js to use findFirst instead of findUnique for soft-deleting users, and improved error handling for already deleted users.

Department Handling Enhancements:

  • Updated department routes in src/routes/department.routes.js to include organization and manager IDs in the path and added routes for getting created departments. Removed middleware imports for role verification.
  • Removed verifyManagerPermission and verifyOwnerOrAdmin middlewares. [1] [2]
  • Updated src/validations/department.validation.js to remove organizationId and managerId from the validation schema.

Documentation and API Specification:

  • Enhanced swagger.json with detailed descriptions, examples, and improved error responses for department-related endpoints. [1] [2] [3] [4]
  • Updated src/docs/TODO.md to reflect new tasks and removed old task assignments.

Miscellaneous Changes:

  • Added email notifications for new owners in src/controllers/organization.controller.js.
  • Corrected routes in src/routes/user.routes.js to use consistent API paths and changed HTTP methods for updating passwords. [1] [2]

These changes aim to improve the overall functionality, maintainability, and clarity of the codebase.

@Kimoo193 Kimoo193 merged commit 1359566 into main Apr 9, 2025
11 checks passed
@Kimoo193 Kimoo193 deleted the feat/126/update-the-department-controller branch April 9, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature For new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAYURE]: update the department controller

2 participants