fea: remove qos download limit (#45)

* fea: remove qos download limit
* fix: crash when qos config missing
* fea: update inSpeed unit to Mbit
This commit is contained in:
Teddy_Zhu
2024-03-28 16:56:14 +08:00
committed by GitHub
parent ffce18224b
commit 2fa0ed3e19
9 changed files with 72 additions and 150 deletions

View File

@@ -54,7 +54,7 @@ func (h QosApi) Add(w http.ResponseWriter, r *http.Request) {
}
if qos != nil {
if err := worker.Qoser().AddQosUser(qos.Name, qos.InSpeed, qos.OutSpeed); err != nil {
if err := worker.Qoser().AddQosUser(qos.Name, qos.InSpeed); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}