Skip to content

Commit

Permalink
fix: ReloadHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
gi8lino committed Aug 7, 2023
1 parent a7de777 commit b2a2c58
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/handlers/reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ func ReloadHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

if err := config.RedactConfig(&config.App); err != nil {
log.Fatalf("Unable to redact config: %s", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

w.WriteHeader(http.StatusOK)
w.Write([]byte("Configuration reloaded successfully"))
}

0 comments on commit b2a2c58

Please sign in to comment.