Răsfoiți Sursa

fix: 修复swagger生产的bug

dcsunny 1 an în urmă
părinte
comite
895d08d2d2
1 a modificat fișierele cu 1 adăugiri și 4 ștergeri
  1. 1 4
      openapiv2/handler.go

+ 1 - 4
openapiv2/handler.go

@@ -30,11 +30,8 @@ func NewHandler(servicesList []string, handlerOpts ...HandlerOption) http.Handle
 		if len(servicesList) > 0 {
 			w.Header().Set("Content-Type", "application/json")
 			w.WriteHeader(200)
-			list := []string{
-				"api.kuban.Kuban",
-			}
 			reply := map[string][]string{
-				"services": list,
+				"services": servicesList,
 			}
 			json.NewEncoder(w).Encode(reply)
 		} else {