Ralph Ocdol 4 달 전
부모
커밋
e4925f9257
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      internal/glance/widget-custom-api.go

+ 1 - 1
internal/glance/widget-custom-api.go

@@ -113,7 +113,6 @@ func fetchAndParseCustomAPI(requests map[string]*http.Request, tmpl *template.Te
 	var resp *http.Response
 	var err error
 	body := make(map[string]string)
-	mergedBody := "{}"
 	for key, req := range requests {
 		resp, err = defaultHTTPClient.Do(req)
 		if err != nil {
@@ -139,6 +138,7 @@ func fetchAndParseCustomAPI(requests map[string]*http.Request, tmpl *template.Te
 		}
 	}
 	
+	mergedBody := "{}"
 	if jsonBody, exists := body[customRandomKeyForSingleRequest]; exists {
 		mergedBody = jsonBody
 	} else {