diff options
author | Jean Helou <jhe@codamens.fr> | 2019-02-22 15:59:02 +0100 |
---|---|---|
committer | Tobias Roeser <le.petit.fou@web.de> | 2019-03-11 07:41:03 +0100 |
commit | f8e0ef75d3b0bddcd6c497f6994915830e4eb6c7 (patch) | |
tree | 2e700cb11d526eb63d0c1b9950085d23c90882b2 /contrib/playlib/test/resources/playsingleapi/app | |
parent | 9da90531dbc8d8dd8f7630376cbfc3bfafdac2ef (diff) | |
download | mill-f8e0ef75d3b0bddcd6c497f6994915830e4eb6c7.tar.gz mill-f8e0ef75d3b0bddcd6c497f6994915830e4eb6c7.tar.bz2 mill-f8e0ef75d3b0bddcd6c497f6994915830e4eb6c7.zip |
Adds test for PlayApi single module
Diffstat (limited to 'contrib/playlib/test/resources/playsingleapi/app')
-rw-r--r-- | contrib/playlib/test/resources/playsingleapi/app/controllers/HomeController.scala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/playlib/test/resources/playsingleapi/app/controllers/HomeController.scala b/contrib/playlib/test/resources/playsingleapi/app/controllers/HomeController.scala new file mode 100644 index 00000000..d9fc4bf2 --- /dev/null +++ b/contrib/playlib/test/resources/playsingleapi/app/controllers/HomeController.scala @@ -0,0 +1,24 @@ +package controllers + +import javax.inject._ +import play.api._ +import play.api.mvc._ + +/** + * This controller creates an `Action` to handle HTTP requests to the + * application's home page. + */ +@Singleton +class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) { + + /** + * Create an Action to render an HTML page. + * + * The configuration in the `routes` file means that this method + * will be called when the application receives a `GET` request with + * a path of `/`. + */ + def index() = Action { implicit request: Request[AnyContent] => + Ok("Welcome to Play") + } +} |