ViewController.scala 808 B

1234567891011121314151617181920212223242526272829303132
  1. package com.weEat.controllers
  2. import javax.inject._
  3. import play.api._
  4. import play.api.mvc._
  5. /**
  6. * This controller creates an `Action` to handle HTTP requests to the
  7. * application's home page.
  8. */
  9. @Singleton
  10. class ViewController @Inject()(
  11. val controllerComponents: ControllerComponents
  12. ) (implicit
  13. val webJarsUtil: org.webjars.play.WebJarsUtil
  14. ) extends BaseController {
  15. /**
  16. * Create an Action to render an HTML page.
  17. *
  18. * The configuration in the `routes` file means that this method
  19. * will be called when the application receives a `GET` request with
  20. * a path of `/`.
  21. */
  22. def index() = Action { implicit request: Request[AnyContent] =>
  23. Ok(views.html.index())
  24. }
  25. def usdaImport() = Action { implicit request: Request[AnyContent] =>
  26. Ok(views.html.usdaImport())
  27. }
  28. }