From 51923d2615e813f6ecf7053fac57c07535f92521 Mon Sep 17 00:00:00 2001 From: jimi Date: Tue, 8 Oct 2013 23:00:41 -0500 Subject: [PATCH] Begin setup of tasks interface Define task routes Create TODO stubs for task controller actions Redirect index action to task list route --- app/controllers/Application.scala | 8 +++++++- conf/routes | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/controllers/Application.scala b/app/controllers/Application.scala index 7cd798f..e5adc2d 100644 --- a/app/controllers/Application.scala +++ b/app/controllers/Application.scala @@ -6,7 +6,13 @@ import play.api.mvc._ object Application extends Controller { def index = Action { - Ok(views.html.index("Your new application is ready.")) + Redirect(routes.Application.tasks) } + def tasks = TODO + + def newTask = TODO + + def deleteTask(id:Long) = TODO + } \ No newline at end of file diff --git a/conf/routes b/conf/routes index 20fd042..c492a10 100644 --- a/conf/routes +++ b/conf/routes @@ -5,5 +5,10 @@ # Home page GET / controllers.Application.index +# Tasks +GET /tasks controllers.Application.tasks +POST /tasks controllers.Application.newTask +POST /tasks/:id/delete controllers.Application.deleteTask(id:Long) + # Map static resources from the /public folder to the /assets URL path GET /assets/*file controllers.Assets.at(path="/public", file)