digirati-annotation-redux
Advanced tools
Comparing version 0.2.10-alpha.7068554a to 0.2.10-alpha.ce57df47
@@ -53,7 +53,7 @@ import md5 from 'blueimp-md5'; | ||
export function sendAnnotation(body, target) { | ||
export function sendAnnotation(body, target, motivation) { | ||
return function (dispatch, state) { | ||
dispatch({ type: ELUCIDATE_SEND_ANNOTATION, payload: { annotation: { body: body, target: target } } }); | ||
dispatch({ type: ELUCIDATE_SEND_ANNOTATION, payload: { annotation: { body: body, target: target, motivation: motivation } } }); | ||
var collection = getCollectionId(state()); | ||
return sendAnnotationToServer(collection, body, target).then(function (annotation) { | ||
return sendAnnotationToServer(collection, body, target, motivation).then(function (annotation) { | ||
return dispatch(addElucidateAnnotation(annotation)); | ||
@@ -60,0 +60,0 @@ }); |
@@ -360,3 +360,3 @@ import _regeneratorRuntime from 'babel-runtime/regenerator'; | ||
export function sendAnnotationToServer(server, body, target) { | ||
export function sendAnnotationToServer(server, body, target, motivation) { | ||
return post(server, { | ||
@@ -366,4 +366,5 @@ '@context': CONTEXT, | ||
body: body, | ||
target: target | ||
target: target, | ||
motivation: motivation | ||
}); | ||
} |
@@ -71,7 +71,7 @@ 'use strict'; | ||
function sendAnnotation(body, target) { | ||
function sendAnnotation(body, target, motivation) { | ||
return function (dispatch, state) { | ||
dispatch({ type: ELUCIDATE_SEND_ANNOTATION, payload: { annotation: { body: body, target: target } } }); | ||
dispatch({ type: ELUCIDATE_SEND_ANNOTATION, payload: { annotation: { body: body, target: target, motivation: motivation } } }); | ||
var collection = (0, _elucidateQuery.getCollectionId)(state()); | ||
return (0, _elucidate.sendAnnotationToServer)(collection, body, target).then(function (annotation) { | ||
return (0, _elucidate.sendAnnotationToServer)(collection, body, target, motivation).then(function (annotation) { | ||
return dispatch(addElucidateAnnotation(annotation)); | ||
@@ -78,0 +78,0 @@ }); |
@@ -384,3 +384,3 @@ 'use strict'; | ||
function sendAnnotationToServer(server, body, target) { | ||
function sendAnnotationToServer(server, body, target, motivation) { | ||
return post(server, { | ||
@@ -390,4 +390,5 @@ '@context': CONTEXT, | ||
body: body, | ||
target: target | ||
target: target, | ||
motivation: motivation | ||
}); | ||
} |
{ | ||
"name": "digirati-annotation-redux", | ||
"version": "0.2.10-alpha.7068554a", | ||
"version": "0.2.10-alpha.ce57df47", | ||
"description": "Describe annotation-redux here", | ||
@@ -5,0 +5,0 @@ "main": "es/index.js", |
90716
2380