// submitNewChampionshipHandler creates a given Championship and redirects the user to begin
// the flow of adding events to the new Championship
submitNewChampionshipHandler creates a given Championship and redirects the user to begin
the flow of adding events to the new Championship
// submitNewChampionshipHandler creates a given Championship and redirects the user to begin // the flow of adding events to the new Championship
func submitNewChampionshipHandler(w http.ResponseWriter, r *http.Request) {
	championship, edited, err := championshipManager.HandleCreateChampionship(r)
	if err != nil {
		logrus.Errorf("couldn't create championship, err: %s", err)
		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
		return
	}
	if edited {
		AddFlashQuick(w, r, "Championship successfully edited!")
		http.Redirect(w, r, "/championship/"+championship.ID.String(), http.StatusFound)
	} else {
		AddFlashQuick(w, r, "We've created the Championship. Now you need to add some Events!")
		http.Redirect(w, r, "/championship/"+championship.ID.String()+"/event", http.StatusFound)
	}
}
func submitNewChampionshipHandler ( w http . ResponseWriter , r * http . Request ) { championship , edited , err := championshipManager . HandleCreateChampionship ( r ) if err != nil { logrus . Errorf ( " " , err ) http . Error ( w , http . StatusText ( http . StatusInternalServerError ) , http . StatusInternalServerError ) return } if edited { AddFlashQuick ( w , r , " " ) http . Redirect ( w , r , " " + championship . ID . String ( ) , http . StatusFound ) } else { AddFlashQuick ( w , r , " " ) http . Redirect ( w , r , " " + championship . ID . String ( ) + " " , http . StatusFound ) } }
submitNewChampionshipHandler creates a given Championship and redirects the user to begin
the flow of adding events to the new Championship
submitNewChampionshipHandler creates a given Championship and redirects the user to begin the flow of adding events to the new Championship