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: blog soft delete #1313

Merged
merged 5 commits into from
Mar 2, 2025
Merged

Conversation

sage-ali
Copy link
Contributor

@sage-ali sage-ali commented Feb 28, 2025

Description

This PR implements soft delete functionality for the Blog entity. It adds a deletedAt column, modifies the delete operation to use softRemove, updates queries to filter out soft-deleted blogs, and ensures existing functionality remains intact. It also updates relevant tests to cover the new soft delete behavior.

Related Issue

Fixes # 1235

Type of Change

  • feat: New feature
  • - [ ] fix: Bug fix
  • docs: Documentation updates
  • style: Code style/formatting changes
  • refactor: Code refactoring
  • perf: Performance improvements
  • test: Test additions/updates
  • chore: Build process or tooling changes
  • ci: CI configuration changes
  • other:

How Has This Been Tested?

  • Unit tests
  • Manual tests

Test Evidence

Screenshot 2025-02-28 201849
Screenshot 2025-02-28 201906
Screenshot 2025-02-28 221332
Screenshot 2025-02-28 220725
Screenshot 2025-02-28 212641
Screenshot 2025-02-28 212503

Checklist

  • My code follows the project's coding style
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if needed)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have included a screenshot showing all tests passing
  • I have included documentation screenshots (if applicable)

Additional Notes

This PR fulfills the requirements to implement soft delete for the Blog entity, enhancing data integrity and providing potential recovery capabilities.

AdeGneus
AdeGneus previously approved these changes Mar 1, 2025
@sage-ali sage-ali changed the title Feat/blog soft delete Feat: blog soft delete Mar 1, 2025
Copy link
Contributor

@TheCodeGhinux TheCodeGhinux left a comment

Choose a reason for hiding this comment

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

Fix your issues

@sage-ali
Copy link
Contributor Author

sage-ali commented Mar 2, 2025

@TheCodeGhinux I reverted the update_at field and rebased.

@TheCodeGhinux TheCodeGhinux merged commit 612da62 into hngprojects:dev Mar 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Implement Soft Delete Functionality for Blog Posts
3 participants