In this section, we add more functionality to the very simple service we created in the previous section. We're going to add the functionality to create tasks using request parameters and also connect our generic
TaskService. First, we look at the route file (
POST /tasks controllers.Step2.createTask( title: String, person: Option[String], status: String ?="New") GET /tasks controllers.Step2.getTasks GET /tasks/:id controllers.Step2.getTask(id: Long) DELETE /tasks/:id controllers.Step2.deleteTask(id: Long) PUT /tasks/:id controllers.Step2.updateTask( id: Long, title: String, person: Option[String], status: String ?="New")
Not that much has changed here, except that we now pass in more arguments ...