mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-28 00:24:19 +00:00
f5e50038f0
NodeService.Delete dropped the node row (and its per-node child rows) without checking for inbounds still referencing it via node_id, leaving orphaned inbounds with a dangling node_id that confuse node sync, subscriptions and cleanup. Refuse the delete with a clear error when inbounds are still attached, and remove the per-node child rows before the node row inside one transaction. Delete stays tolerant of a missing node row so it can still clean up orphaned rows. Regression test covers the blocked and clean-delete paths.