mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-09 21:00:58 +00:00
fix: inbound edit validation failure and legacy copy to clipboard (#5132)
* fix: auto-enable clients when resetting traffic When a client's traffic is exhausted, the panel automatically disables the client and pushes enable: false to the nodes. However, when an admin clicked 'Reset Traffic' or used bulk reset, the counters were zeroed but the client was left disabled. This forced administrators to manually re-enable the client across the central panel and remote nodes. This patch updates ResetTrafficByEmail and BulkResetTraffic to automatically set Enable: true for any previously disabled client and push the updated settings to nodes, ensuring the client is instantly restored upon traffic reset. * fix: inbound edit validation failure and legacy copy to clipboard
This commit is contained in:
@@ -129,6 +129,7 @@ exports[`createDefaultVlessClient > produces a Zod-valid client 1`] = `
|
||||
|
||||
exports[`createDefaultVmessClient > produces a Zod-valid client 1`] = `
|
||||
{
|
||||
"alterId": 0,
|
||||
"comment": "",
|
||||
"email": "fixture@example.test",
|
||||
"enable": true,
|
||||
|
||||
@@ -505,6 +505,7 @@ exports[`InboundSchema (full) fixtures > parses vmess-tcp-tls byte-stably 1`] =
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"alterId": 0,
|
||||
"comment": "",
|
||||
"email": "carol@example.test",
|
||||
"enable": true,
|
||||
|
||||
@@ -185,6 +185,7 @@ exports[`InboundSettingsSchema fixtures > parses vmess-basic byte-stably 1`] = `
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"alterId": 0,
|
||||
"comment": "primary tester",
|
||||
"email": "bob@example.test",
|
||||
"enable": true,
|
||||
|
||||
Reference in New Issue
Block a user