Closed sehmuzc closed 10 months ago
<script>
function saveImageAnnotation(post_id, post_text, type, creator) {
}
</script>
<button onclick="saveImageAnnotation('{{ post.id }}', '{{ post.text }}', '{{ post.type }}', '{{ user.username }}')">Save Annotation</button>
function saveImageAnnotation(post_id, post_text, type, creator) {
const annotation = document.getElementById('annotation').value;
let data = {
'@context': 'http://www.w3.org/ns/anno.jsonld',
'type': 'Annotation',
'body': {
'type': 'TextualBody',
'value': annotation,
'format': 'text/plain',
'creator': creator
},
813abff2954e5385691b239b52f5c39c4e605658
It is fixed by this commit.
When I make a text annotation in production environment the creator value is not set.
function saveAnnotation
does not have creator part. When I make an image annotation in production environment the annotation author is set as post author but it should be requesting user. Creator field should be corrected both in text and image annotations.