func GetPlayers(render render.Render, request *http.Request) { players, err := database.AllPlayers() if err != nil { log.Error(err.Error()) } render.HTML(http.StatusOK, "players", players) }
func GetNewGame(render render.Render, request *http.Request) { stages, err := database.AllStages() if err != nil { log.Error(err.Error()) } characters, err := database.AllCharacters() if err != nil { log.Error(err.Error()) } players, err := database.AllPlayers() if err != nil { log.Error(err.Error()) } newGame := NewGameModel{ Stages: stages, Characters: characters, Players: players, } render.HTML(200, "new-game", newGame) }