mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 12:44:22 +00:00
DeleteByEmail looked up the email in client_records and returned the raw "record not found" gorm error when nothing matched, even though the client could still live inside an inbound's settings.clients JSON (legacy entries that SyncInbound never picked up, or rows deleted out from under a stale inbound). The user-visible delete then fails mysteriously while xray happily keeps serving the client. When GetRecordByEmail returns ErrRecordNotFound, walk inbounds whose settings JSON references the email and run DelInboundClientByEmail on each. The traffic / IP rows are cleaned up at the end unless keepTraffic is set. If no inbound carries the email either, surface a clear "client %q not found in any inbound or client record" error instead. |
||
|---|---|---|
| .. | ||
| controller | ||
| entity | ||
| global | ||
| job | ||
| locale | ||
| middleware | ||
| network | ||
| runtime | ||
| service | ||
| session | ||
| translation | ||
| websocket | ||
| web.go | ||