Bug: Appointment DELETE permanently removes records instead of soft-delete #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The DELETE endpoint in
apps/api/src/routes/appointments.tspermanently removes appointment records. For a business app that needs audit trails and financial records, this should be a soft-delete.Context
Flagged in CEO review on PR #15. Merged without fix.
Fix
Change the DELETE endpoint to set
status = 'cancelled'instead of removing the row. Alternatively, restrict hard delete to admin roles and add a soft-delete as the default.Impact
Lost audit trail and financial records when appointments are deleted.
Fixed in PR #24 (merged 2026-03-17). See commit
43e50255.