mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 04:43:41 +00:00
fix: bt fetcher restore
This commit is contained in:
1 parent
027d29e834
commit
2e5fd3017c
3 files changed
+12
-4
No files matched your search
@@ -21,5 +21,7 @@ func WriteJsonOk(w http.ResponseWriter, v any) {
|
||||
func WriteJson(w http.ResponseWriter, code int, v any) {
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
w.WriteHeader(code)
|
||||
json.NewEncoder(w).Encode(v)
|
||||
if v != nil {
|
||||
json.NewEncoder(w).Encode(v)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user