Skip to content
Snippets Groups Projects
Commit 48f54082 authored by Jack Reed's avatar Jack Reed
Browse files

fixes an issue where SAS#update was referencing the incorrect URI

parent 4e3bbf9e
Branches
No related tags found
No related merge requests found
......@@ -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: {
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment