mirror of
https://github.com/InazumaV/Ratte.git
synced 2026-02-04 20:50:10 +00:00
fix: node name, report user
This commit is contained in:
@@ -80,8 +80,20 @@ func (h *Handler) ReportUserHandle(id int) error {
|
||||
if rsp.Up == 0 && rsp.Down == 0 {
|
||||
return false
|
||||
}
|
||||
users = append(users, panel.UserTrafficInfo{
|
||||
Id: v.Id,
|
||||
Name: v.Name,
|
||||
Upload: rsp.Up,
|
||||
Download: rsp.Down,
|
||||
})
|
||||
return false
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("get user traffic error: %w", err)
|
||||
}
|
||||
if len(users) == 0 {
|
||||
return nil
|
||||
}
|
||||
err = h.p.ReportUserTraffic(&panel.ReportUserTrafficParams{
|
||||
Id: id,
|
||||
Users: users,
|
||||
|
||||
Reference in New Issue
Block a user