mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
rollback debug change
This commit is contained in:
20
src/app/core/cache/builders/link.service.ts
vendored
20
src/app/core/cache/builders/link.service.ts
vendored
@@ -55,20 +55,16 @@ export class LinkService {
|
|||||||
parent: this.parentInjector
|
parent: this.parentInjector
|
||||||
}).get(provider);
|
}).get(provider);
|
||||||
|
|
||||||
const link = model._links[matchingLinkDef.linkName];
|
const href = model._links[matchingLinkDef.linkName].href;
|
||||||
|
|
||||||
if (hasValue(link)) {
|
try {
|
||||||
const href = link.href;
|
if (matchingLinkDef.isList) {
|
||||||
|
model[linkToFollow.name] = service.findAllByHref(href, linkToFollow.findListOptions, ...linkToFollow.linksToFollow);
|
||||||
try {
|
} else {
|
||||||
if (matchingLinkDef.isList) {
|
model[linkToFollow.name] = service.findByHref(href, ...linkToFollow.linksToFollow);
|
||||||
model[linkToFollow.name] = service.findAllByHref(href, linkToFollow.findListOptions, ...linkToFollow.linksToFollow);
|
|
||||||
} else {
|
|
||||||
model[linkToFollow.name] = service.findByHref(href, ...linkToFollow.linksToFollow);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(`Something went wrong when using @dataService(${matchingLinkDef.resourceType.value}) ${hasValue(service) ? '' : '(undefined) '}to resolve link ${linkToFollow.name} from ${href}`);
|
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
throw new Error(`Something went wrong when using @dataService(${matchingLinkDef.resourceType.value}) ${hasValue(service) ? '' : '(undefined) '}to resolve link ${linkToFollow.name} from ${href}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return model;
|
return model;
|
||||||
|
Reference in New Issue
Block a user