mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Added http status text to rest response object and fixed tests
This commit is contained in:
@@ -39,7 +39,8 @@ export class SearchResponseParsingService implements ResponseParsingService {
|
||||
.map((dso) => Object.assign({}, dso, { _embedded: undefined }))
|
||||
.map((dso) => this.dsoParser.parse(request, {
|
||||
payload: dso,
|
||||
statusCode: data.statusCode
|
||||
statusCode: data.statusCode,
|
||||
statusText: data.statusText
|
||||
}))
|
||||
.map((obj) => obj.resourceSelfLinks)
|
||||
.reduce((combined, thisElement) => [...combined, ...thisElement], []);
|
||||
@@ -56,6 +57,6 @@ export class SearchResponseParsingService implements ResponseParsingService {
|
||||
}));
|
||||
payload.objects = objects;
|
||||
const deserialized = new DSpaceRESTv2Serializer(SearchQueryResponse).deserialize(payload);
|
||||
return new SearchSuccessResponse(deserialized, data.statusCode, this.dsoParser.processPageInfo(data.payload));
|
||||
return new SearchSuccessResponse(deserialized, data.statusCode, data.statusText, this.dsoParser.processPageInfo(data.payload));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user