ensured the workaround doesn't break things when the issue gets fixed

This commit is contained in:
Art Lowel
2017-09-21 16:52:23 +02:00
parent 6348057b46
commit bf17246164

View File

@@ -21,7 +21,9 @@ export class RootResponseParsingService implements ResponseParsingService {
for (const link of Object.keys(links)) {
let href = links[link].href;
// TODO temporary workaround as these endpoint paths are relative, but should be absolute
href = new RESTURLCombiner(this.EnvConfig, href.substring(this.EnvConfig.rest.nameSpace.length)).toString();
if (isNotEmpty(href) && !href.startsWith('http')) {
href = new RESTURLCombiner(this.EnvConfig, href.substring(this.EnvConfig.rest.nameSpace.length)).toString();
}
links[link] = href;
}
return new RootSuccessResponse(links, data.statusCode);