client/src/api/WebAnnotationSerializer.js
changeset 168 ea92f4fe783d
parent 129 d48946d164c6
--- a/client/src/api/WebAnnotationSerializer.js	Tue Oct 09 19:07:47 2018 +0200
+++ b/client/src/api/WebAnnotationSerializer.js	Mon Oct 08 18:35:47 2018 +0200
@@ -1,15 +1,17 @@
+import * as R from 'ramda';
+
 class WebAnnotationSerializer {
 
   static serialize = (note) => {
 
-    const categories = note.get('categories');
+    const categories = R.prop('categories', note);
 
     const baseAnnotation = {
       '@context': "http://www.w3.org/ns/anno.jsonld",
       "type":     "Annotation",
     }
 
-    const source = "/session/" + note.get('session') + "/notes/" + note.get('_id');
+    const source = "/session/" + R.prop('session', note) + "/notes/" + R.prop('_id', note);
 
     return categories.map((category, index) => {