This commit is contained in:
poiuty 2022-08-15 12:27:38 +03:00
parent dad37ec59b
commit 30e7296135
3 changed files with 29 additions and 34 deletions

View file

@ -14,6 +14,7 @@ var memInfo runtime.MemStats
type Info struct {
ch chan struct{}
room string
Id string `json:"id"`
Server string `json:"server"`
Proxy string `json:"proxy"`
Online string `json:"online"`
@ -74,11 +75,12 @@ func cmdHandler(w http.ResponseWriter, r *http.Request) {
return
}
params := r.URL.Query()
if len(params["room"]) > 0 && len(params["server"]) > 0 && len(params["proxy"]) > 0 {
if len(params["room"]) > 0 && len(params["id"]) > 0 && len(params["proxy"]) > 0 {
now := time.Now().Unix()
workerData := Info{
room: params["room"][0],
Server: params["server"][0],
Id: params["id"][0],
Server: "",
Proxy: params["proxy"][0],
Online: "0",
Start: now,