Skip to content

Feat/109/restore spacific department#110

Merged
Kimoo193 merged 2 commits into
mainfrom
feat/109/restore-spacific-department
Apr 7, 2025
Merged

Feat/109/restore spacific department#110
Kimoo193 merged 2 commits into
mainfrom
feat/109/restore-spacific-department

Conversation

@Kimoo193
Copy link
Copy Markdown
Contributor

@Kimoo193 Kimoo193 commented Apr 7, 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 #109

@Kimoo193 Kimoo193 linked an issue Apr 7, 2025 that may be closed by this pull request
@Kimoo193 Kimoo193 self-assigned this Apr 7, 2025
@Kimoo193 Kimoo193 requested a review from Copilot April 7, 2025 16:39
@Kimoo193 Kimoo193 added the feature For new feature label Apr 7, 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 2 out of 2 changed files in this pull request and generated no comments.

@Kimoo193
Copy link
Copy Markdown
Contributor Author

Kimoo193 commented Apr 7, 2025

This pull request introduces a new feature to restore soft-deleted departments in the system. The changes include adding a new controller method, updating the routes, and ensuring proper access control.

New Feature: Restore Soft-Deleted Departments

  • Controller Changes:

    • Added a new method restoreDepartment in src/controllers/department.controller.js to handle the restoration of soft-deleted departments. This method includes checks for department existence, deletion status, and user permissions before restoring the department.
  • Route Changes:

    • Updated src/routes/department.routes.js to import the new restoreDepartment method.
    • Added a new route PATCH /api/department/:id/restore to handle the restore operation, using existing middleware for access token verification and owner/admin check.

@Kimoo193 Kimoo193 merged commit b03dc42 into main Apr 7, 2025
11 checks passed
@Kimoo193 Kimoo193 deleted the feat/109/restore-spacific-department branch April 7, 2025 16:40
Kimoo193 added a commit that referenced this pull request Apr 7, 2025
…rtment

Feat/109/restore spacific department
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature For new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Restore spacific department

2 participants