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

feat(repository): implement undo soft delete feature #185

Merged
merged 1 commit into from
Jan 1, 2024
Merged

Conversation

sf-sahil-jassal
Copy link
Contributor

@sf-sahil-jassal sf-sahil-jassal commented Dec 6, 2023

GH-182

Description

Add 2 functionalities to undo the soft delete of a record

  1. undoSoftDeleteById() -> This will just undo soft delete entity by specified id
  2. undoSoftDeleteAll() -> This will undo soft delete entities depending on where clause or all.
    Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested ?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine

@sf-sahil-jassal sf-sahil-jassal force-pushed the GH-182 branch 2 times, most recently from fe14164 to 7612e7e Compare December 6, 2023 07:15
@sf-sahil-jassal sf-sahil-jassal changed the title feat(repository): add undo soft delete feature feat(repository): implement undo soft delete feature Dec 6, 2023
@samarpan-b
Copy link
Contributor

Add a test case as well please

@sf-sahil-jassal
Copy link
Contributor Author

sf-sahil-jassal commented Dec 8, 2023

test case as well please
Ok sir. Sure...

@sf-sahil-jassal sf-sahil-jassal force-pushed the GH-182 branch 3 times, most recently from 7f4eecf to c689140 Compare December 11, 2023 11:57
src/repositories/soft-crud.repository.base.ts Outdated Show resolved Hide resolved
src/repositories/soft-crud.repository.base.ts Outdated Show resolved Hide resolved
add undoSoftDeleteById() and undoSoftDeleteAll() functionalities
which updates deleted = false & deletedBy = undefined

GH-182
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@yeshamavani yeshamavani merged commit 8622d8e into master Jan 1, 2024
2 checks passed
@yeshamavani yeshamavani deleted the GH-182 branch January 1, 2024 11:36
@yeshamavani
Copy link
Contributor

🎉 This PR is included in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants