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)
}
예제 #2
0
파일: server.go 프로젝트: Bootz/nzbcrawler
func Auth(res http.ResponseWriter, req *http.Request, session sessions.Session) {
	if session.Get("login") != true {
		http.Error(res, "forbidden", http.StatusForbidden)
	}
}