Skip to content
Snippets Groups Projects
Unverified Commit fbbbb76a authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Merge pull request #3004 from ProjectMirador/3003-fix-issues-with-imageservice-v3

Fix #3003 - expect 'id' as keyword alias for '@id'
parents 00a06e0e 55a84ca8
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ export function accessTokensReducer(state = {}, action) { ...@@ -10,7 +10,7 @@ export function accessTokensReducer(state = {}, action) {
switch (action.type) { switch (action.type) {
case ActionTypes.RECEIVE_INFO_RESPONSE: case ActionTypes.RECEIVE_INFO_RESPONSE:
if (action.ok && normalizeUrl(action.infoId, { stripAuthentication: false }) === normalizeUrl(action.infoJson['@id'], { stripAuthentication: false })) return state; if (action.ok && normalizeUrl(action.infoId, { stripAuthentication: false }) === normalizeUrl(action.infoJson.id || action.infoJson['@id'], { stripAuthentication: false })) return state;
authService = Utils.getService({ ...action.infoJson, options: {} }, 'http://iiif.io/api/auth/1/external'); authService = Utils.getService({ ...action.infoJson, options: {} }, 'http://iiif.io/api/auth/1/external');
if (!authService) return state; if (!authService) return state;
......
...@@ -10,7 +10,7 @@ export const authReducer = (state = {}, action) => { ...@@ -10,7 +10,7 @@ export const authReducer = (state = {}, action) => {
switch (action.type) { switch (action.type) {
case ActionTypes.RECEIVE_INFO_RESPONSE: case ActionTypes.RECEIVE_INFO_RESPONSE:
if (action.ok && normalizeUrl(action.infoId, { stripAuthentication: false }) === normalizeUrl(action.infoJson['@id'], { stripAuthentication: false })) return state; if (action.ok && normalizeUrl(action.infoId, { stripAuthentication: false }) === normalizeUrl(action.infoJson.id || action.infoJson['@id'], { stripAuthentication: false })) return state;
service = selectNextAuthService( service = selectNextAuthService(
{ auth: state }, action.infoJson, { external: true, kiosk: true }, { auth: state }, action.infoJson, { external: true, kiosk: true },
......
...@@ -18,7 +18,7 @@ export const infoResponsesReducer = (state = {}, action) => { ...@@ -18,7 +18,7 @@ export const infoResponsesReducer = (state = {}, action) => {
return { return {
...state, ...state,
[action.infoId]: { [action.infoId]: {
degraded: !action.ok || !(normalizeUrl(action.infoId, { stripAuthentication: false }) === normalizeUrl(action.infoJson['@id'], { stripAuthentication: false })), degraded: !action.ok || !(normalizeUrl(action.infoId, { stripAuthentication: false }) === normalizeUrl(action.infoJson.id || action.infoJson['@id'], { stripAuthentication: false })),
id: action.infoId, id: action.infoId,
isFetching: false, isFetching: false,
json: action.infoJson, json: action.infoJson,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment