From 48f540823c7faeedf034ac93ac1b03a5f5357e5b Mon Sep 17 00:00:00 2001
From: Jack Reed <phillipjreed@gmail.com>
Date: Wed, 15 Nov 2017 10:18:16 -0800
Subject: [PATCH] fixes an issue where SAS#update was referencing the incorrect
 URI

---
 js/src/annotations/simpleASEndpoint.js      | 2 +-
 spec/annotations/simple-as-endpoint.test.js | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/js/src/annotations/simpleASEndpoint.js b/js/src/annotations/simpleASEndpoint.js
index 854ed532d..05bcf2af2 100644
--- a/js/src/annotations/simpleASEndpoint.js
+++ b/js/src/annotations/simpleASEndpoint.js
@@ -151,7 +151,7 @@ $.SimpleASEndpoint = function (options) {
       delete annotation.fullId;
       delete annotation.endpoint;
       jQuery.ajax({
-        url: _this.url + '/update/' + encodeURIComponent(annotationID) + '?APIKey=' + _this.APIKey, // this.prefix+
+        url: _this.url + '/update?APIKey=' + _this.APIKey, // this.prefix+
         type: 'POST',
         dataType: 'json',
         headers: {
diff --git a/spec/annotations/simple-as-endpoint.test.js b/spec/annotations/simple-as-endpoint.test.js
index 066b8a33a..56bb3dafe 100644
--- a/spec/annotations/simple-as-endpoint.test.js
+++ b/spec/annotations/simple-as-endpoint.test.js
@@ -134,7 +134,7 @@ describe('SimpleASEndpoint', function() {
     it('should run callback on success', function() {
       subject.update(oaAnnotation, returnSuccess, returnError);
       expect(jQuery.ajax).toHaveBeenCalledWith(jasmine.objectContaining({
-        url: subject.url + "/update/AAA?APIKey=" + subject.APIKey,
+        url: subject.url + "/update?APIKey=" + subject.APIKey,
         type: 'POST'
       }));
       expect(returnSuccess).toHaveBeenCalled();
@@ -145,7 +145,7 @@ describe('SimpleASEndpoint', function() {
       ajaxSuccess = false;
       subject.update(oaAnnotation, returnSuccess, returnError);
       expect(jQuery.ajax).toHaveBeenCalledWith(jasmine.objectContaining({
-        url: subject.url + "/update/AAA?APIKey=" + subject.APIKey,
+        url: subject.url + "/update?APIKey=" + subject.APIKey,
         type: 'POST'
       }));
       expect(returnSuccess).not.toHaveBeenCalled();
-- 
GitLab