// exportChampionshipHandler returns all known data about a Championship in JSON format.
exportChampionshipHandler returns all known data about a Championship in JSON format.
// exportChampionshipHandler returns all known data about a Championship in JSON format .
func exportChampionshipHandler(w http.ResponseWriter, r *http.Request) {
	championship, err := championshipManager.LoadChampionship(chi.URLParam(r, "championshipID"))
	if err != nil {
		logrus.Errorf("couldn't export championship, err: %s", err)
		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
		return
	}
	enc := json.NewEncoder(w)
	enc.SetIndent("", "  ")
	enc.Encode(championship)
}
func exportChampionshipHandler ( w http . ResponseWriter , r * http . Request ) { championship , err := championshipManager . LoadChampionship ( chi . URLParam ( r , " " ) ) if err != nil { logrus . Errorf ( " " , err ) http . Error ( w , http . StatusText ( http . StatusInternalServerError ) , http . StatusInternalServerError ) return } enc := json . NewEncoder ( w ) enc . SetIndent ( " " , " " ) enc . Encode ( championship ) }
exportChampionshipHandler returns all known data about a Championship in JSON format.
exportChampionshipHandler returns all known data about a Championship in JSON format .