Hotfix on repairs

This commit is contained in:
Ben Sarmiento
2023-12-06 00:49:11 +01:00
parent de868d97c2
commit 121a28d46f
4 changed files with 44 additions and 38 deletions

View File

@@ -183,18 +183,19 @@ type SponsorResponse struct {
Paypal string `json:"paypal"`
}
type RootResponse struct {
Version string `json:"version"`
BuiltAt string `json:"built_at"`
GitCommit string `json:"git_commit"`
Dav string `json:"dav"`
Html string `json:"html"`
UserInfo *realdebrid.User `json:"user_info"` // Replace UserInfoType with the actual type
MemAlloc uint64 `json:"mem_alloc"` // Memory allocation in MB
TotalAlloc uint64 `json:"total_alloc"` // Total memory allocated in MB
Sys uint64 `json:"sys"` // System memory in MB
NumGC uint32 `json:"num_gc"` // Number of completed GC cycles
PID int `json:"pid"` // Process ID
Sponsor SponsorResponse `json:"sponsor_zurg"` // Sponsorship links
Version string `json:"version"`
BuiltAt string `json:"built_at"`
GitCommit string `json:"git_commit"`
Dav string `json:"dav"`
Html string `json:"html"`
UserInfo *realdebrid.User `json:"user_info"` // Replace UserInfoType with the actual type
MemAlloc uint64 `json:"mem_alloc"` // Memory allocation in MB
TotalAlloc uint64 `json:"total_alloc"` // Total memory allocated in MB
Sys uint64 `json:"sys"` // System memory in MB
NumGC uint32 `json:"num_gc"` // Number of completed GC cycles
PID int `json:"pid"` // Process ID
Sponsor SponsorResponse `json:"sponsor_zurg"` // Sponsorship links
Config config.ZurgConfig `json:"config"`
}
func (zr *ZurgRouter) rootHandler(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
@@ -224,6 +225,7 @@ func (zr *ZurgRouter) rootHandler(resp http.ResponseWriter, req *http.Request, p
Github: "https://github.com/sponsors/debridmediamanager",
Paypal: "https://paypal.me/yowmamasita",
},
Config: zr.cfg.GetConfig(),
}
if err := json.NewEncoder(resp).Encode(response); err != nil {