- user field in workouts
authorAlexandre Bertails <bertails@w3.org>
Thu, 25 Aug 2011 16:21:10 -0400
changeset 93 d07330c501ca
parent 85 ff2542653a41
child 94 ca3131933846
- user field in workouts
src/main/scala/Main.scala
--- a/src/main/scala/Main.scala	Thu Aug 25 14:18:48 2011 -0400
+++ b/src/main/scala/Main.scala	Thu Aug 25 16:21:10 2011 -0400
@@ -69,7 +69,7 @@
         def format(workout:Workout) = {
           import workout.{user => u, _}
           val uri = "%s://%s/user/%s/workout/%s" format (req.underlying.getScheme, host, user, id)
-          """{ "activity": "%s", "user": %s, "date": %d, "duration": %d, "distance": %f, "json": "%s", "gpx": "%s" }""" format (activity, user, date, distance, 12.0, uri+".json", uri+".gpx")
+          """{ "activity": "%s", "date": %d, "duration": %d, "distance": %f, "json": "%s", "gpx": "%s" }""" format (activity, date, distance, 12.0, uri+".json", uri+".gpx")
         }
         val jsonResponse = WorkoutDAO.getAllWorkoutsByUser(user) map { w => format(w) } mkString ("[ ", ", ", " ]")
         Ok ~> ContentType("application/json") ~> ResponseString(jsonResponse)