client/js/models.js
changeset 282 12ee99b182cd
parent 281 9ff388c9bc8d
child 293 fba23fde14ba
--- a/client/js/models.js	Mon Apr 28 16:11:21 2014 +0200
+++ b/client/js/models.js	Mon Apr 28 17:40:41 2014 +0200
@@ -147,6 +147,18 @@
                 relatedModel: User
             }
         ],
+        toJSON: function() {
+            return {
+                _id: this.get("_id"),
+                zoom_level: this.get("zoom_level"),
+                offset_x: this.get("offset_x"),
+                offset_y: this.get("offset_y"),
+                title: this.get("title"),
+                description: this.get("description"),
+                created_by: this.get("created_by") ? this.get("created_by").get("_id") : null
+                // Don't need project id
+            };
+        }
     });
         
     // PROJECT