Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-04-20 15:21:38 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-20 15:21:38 +0300
commit5ff6f4094eee8f6b67023821a21cef8ce45ca857 (patch)
treecdfb2da3682818db9353ba8aea933aafcfab1b0b /web/service
parentbbce1eb3f7e1369ab5137c76d67c31302a610922 (diff)
fix userinfo header
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/service')
-rw-r--r--web/service/sub.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/web/service/sub.go b/web/service/sub.go
index 91abb12a..5a0cfff6 100644
--- a/web/service/sub.go
+++ b/web/service/sub.go
@@ -66,13 +66,7 @@ func (s *SubService) GetSubs(subId string, host string) ([]string, string, error
}
}
}
- header = fmt.Sprintf("upload=%d;download=%d", traffic.Up, traffic.Down)
- if traffic.Total > 0 {
- header = header + fmt.Sprintf(";total=%d", traffic.Total)
- }
- if traffic.ExpiryTime > 0 {
- header = header + fmt.Sprintf(";expire=%d", traffic.ExpiryTime)
- }
+ header = fmt.Sprintf("upload=%d; download=%d; total=%d; expire=%d", traffic.Up, traffic.Down, traffic.Total, traffic.ExpiryTime/1000)
return result, header, nil
}