From e25e67c9f0f4a46c9e80406037eb5bf35423c70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0est=C3=A1k=20V=C3=ADt?= Date: Fri, 6 Jan 2017 12:22:22 +0100 Subject: [PATCH] Changed homepage to something more friendly. --- app/controllers/Application.scala | 4 ++++ conf/routes | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/Application.scala b/app/controllers/Application.scala index f25bb21..2414c4e 100644 --- a/app/controllers/Application.scala +++ b/app/controllers/Application.scala @@ -88,6 +88,10 @@ class Application @Inject() ( } } + def homepage() = Action{ + Redirect(routes.Statistics.vulnerableLibraries(None)) + } + def index(versions: Map[String, Int]) = ReadAction.async{ implicit req => loadSnoozes() flatMap { snoozes => indexPage(versions)(snoozes, securedRequestToUserAwareRequest(req)) diff --git a/conf/routes b/conf/routes index f2032cf..48da7a0 100644 --- a/conf/routes +++ b/conf/routes @@ -3,7 +3,8 @@ # ~~~~ # Home page -GET / controllers.Application.index(versions: Map[String, Int] = Map()) +GET / controllers.Application.homepage() +GET /status controllers.Application.index(versions: Map[String, Int] = Map()) GET /versions controllers.Application.index(versions: Map[String, Int]) GET /dependencies controllers.Application.dependencies(classified: Option[Boolean] = None, requiredTags: Seq[Int] ?= Seq(), noTag: Boolean ?= false) GET /dependencies/classified controllers.Application.dependencies(classified: Option[Boolean] = Some(true), requiredTags: Seq[Int] ?= Seq(), noTag: Boolean ?= false)