diff --git a/js/src/annotations/simpleASEndpoint.js b/js/src/annotations/simpleASEndpoint.js index 854ed532d4303beb505904654f439296b3bae828..05bcf2af2a9dbb5063137853a192244944110ac8 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 066b8a33a3864b2dfe9aa5e6a4bf2841ed5cb10f..56bb3dafe99abb1ba60f173e7d80a7de6b1bc3b5 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();