Skip to content

Fix deleteSubscription method implementation (P0)#244

Open
Timothy2025-20 wants to merge 1 commit intoCalebux:mainfrom
Timothy2025-20:feature/fix-delete-subscription
Open

Fix deleteSubscription method implementation (P0)#244
Timothy2025-20 wants to merge 1 commit intoCalebux:mainfrom
Timothy2025-20:feature/fix-delete-subscription

Conversation

@Timothy2025-20
Copy link
Copy Markdown

Description

Fix runtime crash when calling DELETE /api/subscriptions/:id. The deleteSubscription method was missing causing TypeError.

Changes Made

  • Implemented complete deleteSubscription method:
    • Verify subscription ownership
    • Soft delete with status='deleted' and deleted_at timestamp
    • Cancel all pending reminder schedules
    • Sync deletion to blockchain (non-blocking)
  • Added proper error handling and logging
  • Returns SubscriptionSyncResult with sync status

Impact

Fixes P0 bug where all delete operations crashed the backend.

Related Issue

Close #107

- Add complete deleteSubscription method with soft delete
- Verify ownership before deletion
- Delete pending reminders
- Sync deletion to blockchain (async, non-blocking)
- Add proper error handling and logging

Close Calebux#107
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@Timothy2025-20 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! 🚀

Learn more about application limits

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.

Runtime crash: deleteSubscription method body is missing in subscription-service.ts

1 participant