Fix issues #260, #259, #258, #270: Implement SEO metadata, soft delet…#282
Merged
LaGodxy merged 1 commit intoMettaChain:mainfrom Mar 30, 2026
Merged
Conversation
…#270: Implement SEO metadata, soft delete, cleanup job, and wallet signature verification
|
@DanielCharis1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…e, cleanup job, and wallet signature verification
I have successfully implemented all four issues in the PropChain-BackEnd repository:
✅ Issue #260: Listing SEO Metadata
Added SEO fields to Property model: metaTitle, metaDescription, metaKeywords
Updated DTOs with proper validation and API documentation
Enhanced create/update operations to handle SEO metadata
✅ Issue #259: Restore Soft Deleted Listings
Implemented soft delete using isDeleted and deletedAt fields
Added restore endpoint (POST /:id/restore) to recover deleted properties
Added admin endpoint (GET /deleted/list) to view soft-deleted properties
Updated all queries to exclude soft-deleted properties by default
✅ Issue #258: Hard Delete Cleanup Job
Created PropertyCleanupService with automated cleanup functionality
Scheduled daily cron job (2:00 AM) to permanently delete properties older than 30 days
Added manual cleanup and statistics endpoints for admin use
Proper error handling and logging for cleanup operations
✅ Issue #270: Wallet Signature Verification
Implemented WalletSignatureService using stellar-sdk for signature verification
Created WalletSignatureGuard to protect sensitive endpoints
Added x-signature header requirement for user updates
Enhanced user update endpoint with wallet ownership verification
Proper error handling for invalid signatures
📁 Files Modified/Created:
prisma/schema.prisma - Added SEO and soft delete fields
src/properties/dto/ - Enhanced DTOs with SEO fields
src/properties/properties.service.ts - Added soft delete and restore logic
src/properties/properties.controller.ts - Added new endpoints
src/jobs/property-cleanup.service.ts - New cleanup service
src/auth/wallet-signature.service.ts - New signature verification service
src/auth/guards/wallet-signature.guard.ts - New auth guard
src/users/user.controller.ts - Added protected update endpoint
src/users/user.service.ts - Added update method
prisma/migrations/ - Database migration for new fields
closes #260
closes #259
closes #258
closes #270