mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #7036] [CLOSED] fix(api): partial client update keeps fields it does not mention #6593
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6593
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/7036
Author: @Dv2Corn
Created: 11/1/2026
Status: ❌ Closed
Base:
main← Head:fix/client-partial-update📝 Commits (4)
2fe0212clients: partial API update keeps fields it does not mention1913213fix(api): keep each inbound's flow on a partial client update9e51f6afix(clients): send a cleared reverse tag as null6cbad55docs(api): describe partial semantics of POST /clients/update📊 Changes
14 files changed (+466 additions, -46 deletions)
View changed files
📝
docs/content/docs/en/reference/api/clients.mdx(+13 -11)📝
docs/content/docs/fa/reference/api/clients.mdx(+7 -7)📝
docs/content/docs/ru/reference/api/clients.mdx(+7 -7)📝
docs/content/docs/zh/reference/api/clients.mdx(+6 -6)📝
docs/public/openapi.json(+2 -2)📝
frontend/public/openapi.json(+2 -2)📝
frontend/src/pages/api-docs/endpoints.ts(+2 -2)📝
frontend/src/pages/clients/ClientFormModal.tsx(+3 -3)➕
frontend/src/test/client-form-reverse.test.tsx(+64 -0)📝
internal/web/controller/client.go(+3 -6)➕
internal/web/controller/client_partial_update_test.go(+53 -0)📝
internal/web/service/client_crud.go(+17 -0)➕
internal/web/service/client_partial_update.go(+131 -0)➕
internal/web/service/client_partial_update_test.go(+156 -0)📄 Description
In v3.11.0,
POST /panel/api/clients/update/:emailwith a body that only setsexpiryTimedisables the client (enable=false) and resetslimitIp,totalGB,tgId,comment,group,flow, the renewal settings andlimitHwid. Bots that extend a subscription this way silently switch the customer off.Fields missing from the body are now taken from the stored record; an explicit zero or empty value still clears a field. WireGuard/AmneziaWG keys were already carried over — a test pins that too.
Tests:
internal/web/service/client_partial_update_test.go(fails without the fix);go test ./internal/web/service/...passes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.