mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
# Prevent users from deleting their last connection
## Description
Added a validation check before deleting a connection to ensure users always maintain at least one connection. The system now throws an error if a user attempts to delete their last remaining connection.
---
## Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
## Areas Affected
- [x] Data Storage/Management
- [x] API Endpoints
## Testing Done
- [x] Manual testing performed
## Security Considerations
- [x] No sensitive data is exposed
- [x] Input validation is implemented
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
## Additional Notes
This change prevents users from getting into a state where they have no connections, which could lead to unexpected behavior in the application.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._