Skip to content

Commit

Permalink
keep session
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivar Abrahamsen committed May 17, 2012
1 parent 27b9f16 commit 0e28dfc
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions app/controllers/Application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ object Application extends Controller with Secured {
)

def index = Action { implicit request =>
flash.get("eventId") match {
case None => {
session.get("eventId") match {
case None => Ok(views.html.index(EventController.searchForm, EventController.createForm, registerForm))
case Some(eventId) => Redirect(routes.EventController.viewEvent(eventId.toLong)).withSession(session - "eventId")
}
}
case Some(eventId) => Redirect(routes.EventController.viewEvent(eventId.toLong))
}
Ok(views.html.index(EventController.searchForm, EventController.createForm, registerForm))
// flash.get("eventId") match {
// case None => {
// session.get("eventId") match {
// case None => Ok(views.html.index(EventController.searchForm, EventController.createForm, registerForm))
// case Some(eventId) => Redirect(routes.EventController.viewEvent(eventId.toLong)).withSession(session - "eventId")
// }
// }
// case Some(eventId) => Redirect(routes.EventController.viewEvent(eventId.toLong))
// }
}

def showLogin = Action { implicit request =>
Expand Down

0 comments on commit 0e28dfc

Please sign in to comment.