Skip to content

feature/restore-task#167

Merged
mdawoud27 merged 3 commits into
mainfrom
feature/166/restore_task
Apr 17, 2025
Merged

feature/restore-task#167
mdawoud27 merged 3 commits into
mainfrom
feature/166/restore_task

Conversation

@mdawoud27
Copy link
Copy Markdown
Contributor

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 #166

@mdawoud27 mdawoud27 added documentation Improvements or additions to documentation enhancement New feature or request feature For new feature labels Apr 17, 2025
@mdawoud27 mdawoud27 requested a review from Copilot April 17, 2025 20:18
@mdawoud27 mdawoud27 self-assigned this Apr 17, 2025
@mdawoud27 mdawoud27 linked an issue Apr 17, 2025 that may be closed by this pull request
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.

Pull Request Overview

This PR introduces a new feature that allows soft-deleted tasks to be restored, including the option to restore their subtasks. Key changes include:

  • Adding the new PATCH endpoint and corresponding route in src/routes/task.routes.js.
  • Implementing the restoreTask controller function in src/controllers/task.controller.js.
  • Updating README.md with documentation for the restore endpoint.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/routes/task.routes.js Added a PATCH route to call restoreTask.
src/controllers/task.controller.js Implemented restoreTask with transaction handling and subtasks restoration.
README.md Updated API documentation to include the restore endpoint.
Files not reviewed (1)
  • src/docs/swagger.json: Language not supported
Comments suppressed due to low confidence (1)

src/controllers/task.controller.js:1319

  • [nitpick] Consider renaming the inner 'prisma' parameter in the transaction callback to avoid shadowing the outer Prisma client reference, which would improve code clarity.
await prisma.$transaction(async (prisma) => {

@mdawoud27 mdawoud27 merged commit 92c8ae0 into main Apr 17, 2025
11 checks passed
@mdawoud27 mdawoud27 deleted the feature/166/restore_task branch April 17, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request feature For new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Restore the deleted task

2 participants