Skip to content

Feat/81/create a department#93

Merged
Kimoo193 merged 8 commits into
mainfrom
feat/81/create-a-department
Apr 6, 2025
Merged

Feat/81/create a department#93
Kimoo193 merged 8 commits into
mainfrom
feat/81/create-a-department

Conversation

@Kimoo193
Copy link
Copy Markdown
Contributor

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

@Kimoo193 Kimoo193 linked an issue Apr 6, 2025 that may be closed by this pull request
@Kimoo193 Kimoo193 requested a review from Copilot April 6, 2025 23:17
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 5 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/docs/swagger.json: Language not supported
Comments suppressed due to low confidence (2)

src/routes/department.routes.js:10

  • The route path '/api/department/all' does not match the documented endpoint '/api/departments' in the department controller. Consider updating the route for consistency.
  '/api/department/all',

src/controllers/user.controller.js:441

  • The function 'deleteFromCloudinary' is used without being imported. Ensure that it is imported correctly to avoid runtime errors.
    await deleteFromCloudinary(user.profilePic);

Comment thread src/index.js Outdated
Kimoo193 and others added 2 commits April 7, 2025 01:20
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Kimoo193
Copy link
Copy Markdown
Contributor Author

Kimoo193 commented Apr 6, 2025

This pull request introduces a new endpoint to retrieve all departments, along with the necessary middleware, routes, and documentation updates. The most important changes include adding the getAllDepartments controller, updating the Swagger documentation, and incorporating new middleware for permission verification.

New Controller and Route:

Middleware:

Swagger Documentation:

Application Setup:

  • src/index.js: Imported the new department routes and updated CORS policy to allow specific origins and methods. [1] [2] [3]

@Kimoo193 Kimoo193 requested a review from Copilot April 6, 2025 23:23
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 4 out of 5 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/docs/swagger.json: Language not supported
Comments suppressed due to low confidence (1)

src/controllers/department.controller.js:5

  • The documented route '/api/departments' does not match the implemented endpoint in the route file. Please update the documentation to reflect the correct endpoint.
 * @route  GET /api/departments

@TaskTrial TaskTrial deleted a comment from Copilot AI Apr 6, 2025
@Kimoo193 Kimoo193 self-assigned this Apr 6, 2025
@Kimoo193 Kimoo193 added the feature For new feature label Apr 6, 2025
@Kimoo193 Kimoo193 merged commit 3c70a18 into main Apr 6, 2025
9 of 11 checks passed
@Kimoo193 Kimoo193 deleted the feat/81/create-a-department branch April 6, 2025 23:30
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.

Create a department

2 participants