made use of embedded resources for relationships in the response that contain a single link for a set of resources rather than enumerate the self link of each resource

This commit is contained in:
Art Lowel
2017-06-21 16:51:37 +02:00
parent 0bccc7c201
commit b46ad36eaf
6 changed files with 82 additions and 55 deletions

View File

@@ -185,7 +185,12 @@ export class RemoteDataBuildService {
rdArr.push(this.buildSingle(href, resourceConstructor));
});
links[relationship] = this.aggregate(rdArr);
if (rdArr.length === 1) {
links[relationship] = rdArr[0];
}
else {
links[relationship] = this.aggregate(rdArr);
}
}
else {
// without the setTimeout, the actions inside requestService.configure