Skip to content

Commit

Permalink
fix: fix the bad variable reference (#2984)
Browse files Browse the repository at this point in the history
Signed-off-by: ZhangZhe <[email protected]>
  • Loading branch information
zhang943 authored Jul 11, 2024
1 parent 4096a9e commit c956d7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/server/meta_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func sourceConfKeyHandler(w http.ResponseWriter, r *http.Request) {
case http.MethodPut:
v, err1 := io.ReadAll(r.Body)
if err1 != nil {
handleError(w, err, "Invalid body", logger)
handleError(w, err1, "Invalid body", logger)
return
}
err = meta.AddSourceConfKey(pluginName, confKey, language, v)
Expand All @@ -265,7 +265,7 @@ func sinkConfKeyHandler(w http.ResponseWriter, r *http.Request) {
case http.MethodPut:
v, err1 := io.ReadAll(r.Body)
if err1 != nil {
handleError(w, err, "Invalid body", logger)
handleError(w, err1, "Invalid body", logger)
return
}
err = meta.AddSinkConfKey(pluginName, confKey, language, v)
Expand Down Expand Up @@ -296,7 +296,7 @@ func connectionConfKeyHandler(w http.ResponseWriter, r *http.Request) {
reqField := make(map[string]interface{})
err = json.Unmarshal(v, &reqField)
if err != nil {
handleError(w, err1, "Invalid body", logger)
handleError(w, err, "Invalid body", logger)
return
}
reqField = replacePasswdForConfig("connection", confKey, reqField)
Expand Down

0 comments on commit c956d7e

Please sign in to comment.