+ mapped /app to app.ssp
authortgambet
Thu, 25 Aug 2011 15:44:02 -0400
changeset 88 4f6c2c3b7f1f
parent 87 d2b5c3efa274
child 89 3fde3593d89c
+ mapped /app to app.ssp
src/main/scala/Main.scala
--- a/src/main/scala/Main.scala	Thu Aug 25 15:38:21 2011 -0400
+++ b/src/main/scala/Main.scala	Thu Aug 25 15:44:02 2011 -0400
@@ -36,6 +36,11 @@
       Ok ~> ContentType("application/xhtml+xml") ~> Scalate(req, "geolocation.ssp")(engine)
   }
   
+  val app = unfiltered.filter.Planify {
+    case req @ Path(Seg("app" :: Nil)) =>
+      Ok ~> ContentType("application/xhtml+xml") ~> Scalate(req, "app.ssp")(engine)
+  }
+  
   val workoutAPI = unfiltered.filter.Planify {
     case req @ POST(Path(Seg("user" :: user :: "workout" :: Nil))) & Host(host) => {
       val json:MongoDBObject = com.mongodb.util.JSON.parse(Body.string(req)).asInstanceOf[com.mongodb.DBObject]
@@ -102,7 +107,7 @@
       ctx.resources(fromClasspath("scripts/").toURI.toURL)
     }.context("/styles"){ ctx:ContextBuilder =>
       ctx.resources(fromClasspath("styles/").toURI.toURL)
-    }.filter(tracker).filter(workoutAPI).filter(echo).run()
+    }.filter(tracker).filter(app).filter(workoutAPI).filter(echo).run()
 
     
   }