[PR #3254] [CLOSED] Endpoint for updating client traffic by email #5373

Closed
opened 2026-10-31 20:46:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3254
Author: @azavaxhuman
Created: 7/19/2025
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (10+)

📊 Changes

7 files changed (+255 additions, -13 deletions)

View changed files

➕ .github/workflows/comp_4x.yml (+201 -0)
📝 README.md (+1 -1)
📝 install.sh (+4 -4)
📝 web/controller/api.go (+2 -1)
📝 web/controller/inbound.go (+25 -0)
📝 web/service/inbound.go (+15 -0)
📝 x-ui.sh (+7 -7)

📄 Description

Pull Request Description

What is the pull request?

This pull request introduces a new API endpoint /panel/api/inbounds/updateClientTraffic/:email to update the upload and download traffic for a client based on their email address in the 3X-UI project. The endpoint accepts a POST request with a JSON body containing upload and download values (64-bit integers) and updates the corresponding ClientTraffic record in the database. The implementation follows the existing patterns in the codebase, including authentication via checkLogin middleware, proper error handling, and consistent response formatting using jsonMsg.

Which part of the application is affected by the change?

  • Frontend

  • Backend

Type of Changes

  • New feature

  • Bug fix

  • Refactoring

  • Other

Screenshots

Not applicable, as this is a backend API change with no frontend modifications.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/3254 **Author:** [@azavaxhuman](https://github.com/azavaxhuman) **Created:** 7/19/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`2383049`](https://github.com/MHSanaei/3x-ui/commit/2383049bf235d8d179332ffea4a490914ddec2cb) api test - [`ce11fe3`](https://github.com/MHSanaei/3x-ui/commit/ce11fe397fba937aca475c144f436852f3034e8f) Update inbound.go - [`856ec00`](https://github.com/MHSanaei/3x-ui/commit/856ec0051ca5c7a5eae28a62abbfb37eb26737ea) Create workflowscom_release.yaml - [`5183ea7`](https://github.com/MHSanaei/3x-ui/commit/5183ea76f4e72825b085447f5ae4607061fc5715) Rename workflowscom_release.yaml to comp_release.yaml - [`c825787`](https://github.com/MHSanaei/3x-ui/commit/c825787d962c7a638fe42e43de3c5ca6c36d9ef0) Delete .github/comp_release.yaml - [`937281e`](https://github.com/MHSanaei/3x-ui/commit/937281ef4f1cd82abe9d9065ef41ffb27bc2cfbe) Create comp_4x.yml - [`fc2c752`](https://github.com/MHSanaei/3x-ui/commit/fc2c75215978168a8b2ec9cacaa3f9d354bd0dbe) Update comp_4x.yml - [`081cd64`](https://github.com/MHSanaei/3x-ui/commit/081cd64e9ef1ff6c87522a3d1c4c5f2d2389cd4d) Update comp_4x.yml - [`811a41d`](https://github.com/MHSanaei/3x-ui/commit/811a41de7b27c051f9af4e9aba3fc3e207355444) change 3 to 4 - [`0821b5d`](https://github.com/MHSanaei/3x-ui/commit/0821b5dbdf649ef1b1f0f2f199077f660b12ac6e) Merge branch 'main' of https://github.com/azavaxhuman/4x-ui ### 📊 Changes **7 files changed** (+255 additions, -13 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/comp_4x.yml` (+201 -0) 📝 `README.md` (+1 -1) 📝 `install.sh` (+4 -4) 📝 `web/controller/api.go` (+2 -1) 📝 `web/controller/inbound.go` (+25 -0) 📝 `web/service/inbound.go` (+15 -0) 📝 `x-ui.sh` (+7 -7) </details> ### 📄 Description # Pull Request Description ## What is the pull request? This pull request introduces a new API endpoint /panel/api/inbounds/updateClientTraffic/:email to update the upload and download traffic for a client based on their email address in the 3X-UI project. The endpoint accepts a POST request with a JSON body containing upload and download values (64-bit integers) and updates the corresponding ClientTraffic record in the database. The implementation follows the existing patterns in the codebase, including authentication via checkLogin middleware, proper error handling, and consistent response formatting using jsonMsg. ## Which part of the application is affected by the change? - [ ] Frontend - [x] Backend ## Type of Changes - [x] New feature - [ ] Bug fix - [ ] Refactoring - [ ] Other ## Screenshots Not applicable, as this is a backend API change with no frontend modifications. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:46:32 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5373
No description provided.