aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/Sale.scala37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/controllers/Sale.scala b/app/controllers/Sale.scala
new file mode 100644
index 0000000..b5e4622
--- /dev/null
+++ b/app/controllers/Sale.scala
@@ -0,0 +1,37 @@
1package controllers
2
3import play.api._
4import play.api.data._
5import play.api.data.Forms._
6import play.api.mvc._
7
8import play.api.db.slick._
9import play.api.db.slick.Config.driver.simple._
10import play.api.Play.current
11
12import scala.concurrent.Future
13
14import models._
15
16
17object Sale extends Controller {
18
19 def sales = Auth { implicit request =>
20 DB.withSession { implicit session =>
21 val currentDateTime = new java.sql.Timestamp((new java.util.Date).getTime)
22 val sales = Views.Sales.filter(_.endDate > currentDateTime).sortBy(_.endDate.asc).run
23
24 Ok(views.html.pages.sales.currentSales(sales))
25 }
26 }
27
28 def sell(itemUuid: String) = TODO
29
30
31 def item(itemUuid: String) = TODO
32
33 def bids(itemUuid: String) = TODO
34
35 def bidSubmit(itemUuid: String) = TODO
36
37}