func SearchAnswersNew(r render.Render, db *mgo.Database, req *http.Request, session sessions.Session) { lastGameIdSearched := session.Get("last_game_id_searched") templateData := map[string]interface{}{"metatitle": "Battle Answers", "currentPath": req.URL.Path, "lastGameIdSearched": lastGameIdSearched, "games": models.GetGameRecs(db, nil)} r.HTML(200, "search_answers/new", templateData) }
func Auth(res http.ResponseWriter, req *http.Request, session sessions.Session) { if session.Get("login") != true { http.Error(res, "forbidden", http.StatusForbidden) } }