Skip to content

Commit

Permalink
removed clickthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Jul 31, 2015
1 parent 916e0d6 commit 8ec5d48
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 34 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manifesto",
"version": "0.1.7",
"version": "0.1.8",
"homepage": "https://github.com/edsilv/manifesto",
"authors": [
"edsilv <[email protected]>"
Expand Down
12 changes: 3 additions & 9 deletions dist/client/manifesto.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,15 +611,9 @@ var Manifesto;
});
}
else {
// if the resource has a click through service, use that.
if (resource.clickThroughService) {
resolve(clickThrough(resource));
}
else {
_this.authorize(resource, clickThrough, login, getAccessToken, storeAccessToken, getStoredAccessToken).then(function () {
resolve(handleResourceResponse(resource));
});
}
_this.authorize(resource, clickThrough, login, getAccessToken, storeAccessToken, getStoredAccessToken).then(function () {
resolve(handleResourceResponse(resource));
});
}
});
}
Expand Down
12 changes: 3 additions & 9 deletions dist/server/manifesto.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,9 @@ var Manifesto;
});
}
else {
// if the resource has a click through service, use that.
if (resource.clickThroughService) {
resolve(clickThrough(resource));
}
else {
_this.authorize(resource, clickThrough, login, getAccessToken, storeAccessToken, getStoredAccessToken).then(function () {
resolve(handleResourceResponse(resource));
});
}
_this.authorize(resource, clickThrough, login, getAccessToken, storeAccessToken, getStoredAccessToken).then(function () {
resolve(handleResourceResponse(resource));
});
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manifesto",
"version": "0.1.7",
"version": "0.1.8",
"description": "IIIF Presentation API utility library for client and server",
"main": "dist/server/manifesto.js",
"scripts": {
Expand Down
23 changes: 9 additions & 14 deletions src/Manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,20 +385,15 @@ module Manifesto {

});
} else {
// if the resource has a click through service, use that.
if (resource.clickThroughService){
resolve(clickThrough(resource));
} else {
this.authorize(
resource,
clickThrough,
login,
getAccessToken,
storeAccessToken,
getStoredAccessToken).then(() => {
resolve(handleResourceResponse(resource));
});
}
this.authorize(
resource,
clickThrough,
login,
getAccessToken,
storeAccessToken,
getStoredAccessToken).then(() => {
resolve(handleResourceResponse(resource));
});
}
});
}
Expand Down

0 comments on commit 8ec5d48

Please sign in to comment.