Skip to content

Commit

Permalink
Fix: Create annotation in API using thread rather than threadNumber (#…
Browse files Browse the repository at this point in the history
…315)

- The annotations API refers to thread numbers as thread, therefore any
  create API request MUST provide the threadNumber as thread as to avoid
  adding the new annotation to it's own thread and incrementing the
  threadNumber
  • Loading branch information
pramodsum authored Aug 17, 2017
1 parent 27b118d commit 783adbc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/annotations/AnnotationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ class AnnotationService extends EventEmitter {
threadID: annotation.threadID
},
message: annotation.text,
threadNumber: annotation.threadNumber
thread: annotation.threadNumber
})
// NOTE: Ensure that threadNumbers are sent to the API as
// thread, else the API created annotation will have an
// incremented threadNumber. This is due to the naming system
// in the annotations API
})
.then((response) => response.json())
.then((data) => {
Expand Down

0 comments on commit 783adbc

Please sign in to comment.