--- a/src/main/scala/Main.scala Thu Aug 25 12:23:04 2011 -0400
+++ b/src/main/scala/Main.scala Thu Aug 25 12:56:24 2011 -0400
@@ -39,6 +39,7 @@
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]
+ json += "user" -> user
val workout = grater[Workout].asObject(json)
WorkoutDAO.insert(workout) match {
case Some(id) => {
--- a/src/test/scala/WorkoutAPISpec.scala Thu Aug 25 12:23:04 2011 -0400
+++ b/src/test/scala/WorkoutAPISpec.scala Thu Aug 25 12:56:24 2011 -0400
@@ -15,7 +15,6 @@
val workout = """
{
"activity": "http://dbpedia.org/resource/Running",
- "user": "jdoe",
"date": 1314049555595,
"distance": 5000,
"events":