From f4c2b88ffd0cfd6d0721dd8a9a235739a6eb2c8c Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Thu, 26 Jul 2018 14:08:17 -0700 Subject: [PATCH 1/6] move dockerfile into codebase --- .dockerignore | 2 ++ Dockerfile | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..29d02b9caf --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git +node-modules/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..4dff02ffd3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +# This image will be published as dspace/dspace-angular +# See https://dspace-labs.github.io/DSpace-Docker-Images/ for usage details + +FROM node:8 +WORKDIR /app +ADD . /app/ +EXPOSE 3000 + +RUN yarn install +CMD yarn run watch From 08c2aaaa51bb4903d778e5ee208ac806bae825d0 Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Fri, 27 Jul 2018 11:20:07 -0700 Subject: [PATCH 2/6] use alpine-node --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4dff02ffd3..bd2f4cda3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # This image will be published as dspace/dspace-angular # See https://dspace-labs.github.io/DSpace-Docker-Images/ for usage details -FROM node:8 +FROM alpine-node:8 WORKDIR /app ADD . /app/ EXPOSE 3000 From 033927bb74b88c0fec0a739466f6abd43ba91ab7 Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Fri, 27 Jul 2018 15:02:46 -0700 Subject: [PATCH 3/6] fix base image name --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bd2f4cda3a..f10164ebd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # This image will be published as dspace/dspace-angular # See https://dspace-labs.github.io/DSpace-Docker-Images/ for usage details -FROM alpine-node:8 +FROM node:8-alpine WORKDIR /app ADD . /app/ EXPOSE 3000 From f83e907b84552cc0452b20b6710855ad9b2d7e94 Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Fri, 27 Jul 2018 17:28:54 -0700 Subject: [PATCH 4/6] expand dockeringore based on gitignore --- .dockerignore | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 29d02b9caf..5889e7a85c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,21 @@ .git -node-modules/ +node-modules +__build__ +__server_build__ +typings +tsd_typings +npm-debug.log +dist +coverage +.idea +*.iml +*.ngfactory.ts +*.css.shim.ts +*.scss.shim.ts +.DS_Store +webpack.records.json +npm-debug.log.* +morgan.log +yarn-error.log +*.css +package-lock.json From 87dcdac5518b7988f638aa69880fd4d807aaf615 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 9 Aug 2018 11:15:58 +0200 Subject: [PATCH 5/6] Added comments and some refactoring to new files --- .../collections/collections.component.spec.ts | 2 +- ....spec.ts => id-to-uuid-serializer.spec.ts} | 0 src/app/core/cache/id-to-uuid-serializer.ts | 35 ++++++++++ src/app/core/cache/it-to-uuid-serializer.ts | 19 ------ .../core/cache/models/action-type.model.ts | 64 +++++++++++++++++++ .../normalized-bitstream-format.model.ts | 35 +++++++++- .../models/normalized-bitstream.model.ts | 3 + .../cache/models/normalized-bundle.model.ts | 6 ++ .../models/normalized-collection.model.ts | 6 ++ .../models/normalized-community.model.ts | 8 ++- .../cache/models/normalized-item.model.ts | 6 ++ .../normalized-resource-policy.model.ts | 30 ++++++++- .../core/cache/models/support-level.model.ts | 19 ++++++ src/app/core/shared/bitstream-format.model.ts | 30 +++++++++ src/app/core/shared/resource-policy.model.ts | 30 +++++++-- 15 files changed, 263 insertions(+), 30 deletions(-) rename src/app/core/cache/{it-to-uuid-serializer.spec.ts => id-to-uuid-serializer.spec.ts} (100%) create mode 100644 src/app/core/cache/id-to-uuid-serializer.ts delete mode 100644 src/app/core/cache/it-to-uuid-serializer.ts create mode 100644 src/app/core/cache/models/action-type.model.ts create mode 100644 src/app/core/cache/models/support-level.model.ts diff --git a/src/app/+item-page/field-components/collections/collections.component.spec.ts b/src/app/+item-page/field-components/collections/collections.component.spec.ts index 911a90175c..871018a9d8 100644 --- a/src/app/+item-page/field-components/collections/collections.component.spec.ts +++ b/src/app/+item-page/field-components/collections/collections.component.spec.ts @@ -60,7 +60,7 @@ describe('CollectionsComponent', () => { }); }); - describe('When the requested item request has succeeded', () => { + describe('When the requested item request has failed', () => { beforeEach(() => { collectionsComponent.item = failedMockItem; fixture.detectChanges(); diff --git a/src/app/core/cache/it-to-uuid-serializer.spec.ts b/src/app/core/cache/id-to-uuid-serializer.spec.ts similarity index 100% rename from src/app/core/cache/it-to-uuid-serializer.spec.ts rename to src/app/core/cache/id-to-uuid-serializer.spec.ts diff --git a/src/app/core/cache/id-to-uuid-serializer.ts b/src/app/core/cache/id-to-uuid-serializer.ts new file mode 100644 index 0000000000..79576d448e --- /dev/null +++ b/src/app/core/cache/id-to-uuid-serializer.ts @@ -0,0 +1,35 @@ +import { hasValue } from '../../shared/empty.util'; + +/** + * Serializer to create unique fake UUID's from id's that might otherwise be the same across multiple object types + */ +export class IDToUUIDSerializer { + /** + * @param {string} prefix To prepend the original ID with + */ + constructor(private prefix: string) { + } + + /** + * Method to serialize a UUID + * @param {string} uuid + * @returns {any} undefined Fake UUID's should not be sent back to the server, but only be used in the UI + */ + Serialize(uuid: string): any { + return undefined; + } + + /** + * Method to deserialize a UUID + * @param {string} id Identifier to transform in to a UUID + * @returns {string} UUID based on the prefix and the given id + */ + Deserialize(id: string): string { + if (hasValue(id)) { + return `${this.prefix}-${id}`; + } else { + return id; + } + + } +} diff --git a/src/app/core/cache/it-to-uuid-serializer.ts b/src/app/core/cache/it-to-uuid-serializer.ts deleted file mode 100644 index 0d619f457b..0000000000 --- a/src/app/core/cache/it-to-uuid-serializer.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { hasValue } from '../../shared/empty.util'; - -export class IDToUUIDSerializer { - constructor(private prefix: string) { - } - - Serialize(uuid: string): any { - return undefined; // ui-only uuid doesn't need to be sent back to the server - } - - Deserialize(id: string): string { - if (hasValue(id)) { - return `${this.prefix}-${id}`; - } else { - return id; - } - - } -} diff --git a/src/app/core/cache/models/action-type.model.ts b/src/app/core/cache/models/action-type.model.ts new file mode 100644 index 0000000000..4965f93e89 --- /dev/null +++ b/src/app/core/cache/models/action-type.model.ts @@ -0,0 +1,64 @@ +/** + * Enum representing the Action Type of a Resource Policy + */ +export enum ActionType { + /** + * Action of reading, viewing or downloading something + */ + READ = 0, + + /** + * Action of modifying something + */ + WRITE = 1, + + /** + * Action of deleting something + */ + DELETE = 2, + + /** + * Action of adding something to a container + */ + ADD = 3, + + /** + * Action of removing something from a container + */ + REMOVE = 4, + + /** + * Action of performing workflow step 1 + */ + WORKFLOW_STEP_1 = 5, + + /** + * Action of performing workflow step 2 + */ + WORKFLOW_STEP_2 = 6, + + /** + * Action of performing workflow step 3 + */ + WORKFLOW_STEP_3 = 7, + + /** + * Action of performing a workflow abort + */ + WORKFLOW_ABORT = 8, + + /** + * Default Read policies for Bitstreams submitted to container + */ + DEFAULT_BITSTREAM_READ = 9, + + /** + * Default Read policies for Items submitted to container + */ + DEFAULT_ITEM_READ = 10, + + /** + * Administrative actions + */ + ADMIN = 11, +} diff --git a/src/app/core/cache/models/normalized-bitstream-format.model.ts b/src/app/core/cache/models/normalized-bitstream-format.model.ts index db9fa571f1..5d11c97107 100644 --- a/src/app/core/cache/models/normalized-bitstream-format.model.ts +++ b/src/app/core/cache/models/normalized-bitstream-format.model.ts @@ -2,34 +2,65 @@ import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize' import { BitstreamFormat } from '../../shared/bitstream-format.model'; import { mapsTo } from '../builders/build-decorators'; -import { IDToUUIDSerializer } from '../it-to-uuid-serializer'; +import { IDToUUIDSerializer } from '../id-to-uuid-serializer'; import { NormalizedObject } from './normalized-object.model'; +import { SupportLevel } from './support-level.model'; +/** + * Normalized model class for a Bitstream Format + */ @mapsTo(BitstreamFormat) @inheritSerialization(NormalizedObject) export class NormalizedBitstreamFormat extends NormalizedObject { + /** + * Short description of this Bitstream Format + */ @autoserialize shortDescription: string; + /** + * Description of this Bitstream Format + */ @autoserialize description: string; + /** + * String representing the MIME type of this Bitstream Format + */ @autoserialize mimetype: string; + /** + * The level of support the system offers for this Bitstream Format + */ @autoserialize - supportLevel: number; + supportLevel: SupportLevel; + /** + * True if the Bitstream Format is used to store system information, rather than the content of items in the system + */ @autoserialize internal: boolean; + /** + * String representing this Bitstream Format's file extension + */ @autoserialize extensions: string; + /** + * Identifier for this Bitstream Format + * Note that this ID is unique for bitstream formats, + * but might not be unique across different object types + */ @autoserialize id: string; + /** + * Universally unique identifier for this Bitstream Format + * Consist of a prefix and the id field to ensure the identifier is unique across all object types + */ @autoserializeAs(new IDToUUIDSerializer('bitstream-format'), 'id') uuid: string; } diff --git a/src/app/core/cache/models/normalized-bitstream.model.ts b/src/app/core/cache/models/normalized-bitstream.model.ts index db8002a874..63f84add41 100644 --- a/src/app/core/cache/models/normalized-bitstream.model.ts +++ b/src/app/core/cache/models/normalized-bitstream.model.ts @@ -5,6 +5,9 @@ import { Bitstream } from '../../shared/bitstream.model'; import { mapsTo, relationship } from '../builders/build-decorators'; import { ResourceType } from '../../shared/resource-type'; +/** + * Normalized model class for a DSpace Bitstream + */ @mapsTo(Bitstream) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedBitstream extends NormalizedDSpaceObject { diff --git a/src/app/core/cache/models/normalized-bundle.model.ts b/src/app/core/cache/models/normalized-bundle.model.ts index 3b594dd308..5535ab57e5 100644 --- a/src/app/core/cache/models/normalized-bundle.model.ts +++ b/src/app/core/cache/models/normalized-bundle.model.ts @@ -5,6 +5,9 @@ import { Bundle } from '../../shared/bundle.model'; import { mapsTo, relationship } from '../builders/build-decorators'; import { ResourceType } from '../../shared/resource-type'; +/** + * Normalized model class for a DSpace Bundle + */ @mapsTo(Bundle) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedBundle extends NormalizedDSpaceObject { @@ -25,6 +28,9 @@ export class NormalizedBundle extends NormalizedDSpaceObject { */ owner: string; + /** + * List of Bitstreams that are part of this Bundle + */ @autoserialize @relationship(ResourceType.Bitstream, true) bitstreams: string[]; diff --git a/src/app/core/cache/models/normalized-collection.model.ts b/src/app/core/cache/models/normalized-collection.model.ts index add0795ec5..a2c634c3e5 100644 --- a/src/app/core/cache/models/normalized-collection.model.ts +++ b/src/app/core/cache/models/normalized-collection.model.ts @@ -5,6 +5,9 @@ import { Collection } from '../../shared/collection.model'; import { mapsTo, relationship } from '../builders/build-decorators'; import { ResourceType } from '../../shared/resource-type'; +/** + * Normalized model class for a DSpace Collection + */ @mapsTo(Collection) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedCollection extends NormalizedDSpaceObject { @@ -36,6 +39,9 @@ export class NormalizedCollection extends NormalizedDSpaceObject { @relationship(ResourceType.Community, false) owner: string; + /** + * List of Items that are part of (not necessarily owned by) this Collection + */ @autoserialize @relationship(ResourceType.Item, true) items: string[]; diff --git a/src/app/core/cache/models/normalized-community.model.ts b/src/app/core/cache/models/normalized-community.model.ts index 03784e414b..b1c2fe3cdd 100644 --- a/src/app/core/cache/models/normalized-community.model.ts +++ b/src/app/core/cache/models/normalized-community.model.ts @@ -1,10 +1,13 @@ -import { autoserialize, inheritSerialization, autoserializeAs } from 'cerialize'; +import { autoserialize, inheritSerialization } from 'cerialize'; import { NormalizedDSpaceObject } from './normalized-dspace-object.model'; import { Community } from '../../shared/community.model'; import { mapsTo, relationship } from '../builders/build-decorators'; import { ResourceType } from '../../shared/resource-type'; +/** + * Normalized model class for a DSpace Community + */ @mapsTo(Community) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedCommunity extends NormalizedDSpaceObject { @@ -36,6 +39,9 @@ export class NormalizedCommunity extends NormalizedDSpaceObject { @relationship(ResourceType.Community, false) owner: string; + /** + * List of Collections that are owned by this Community + */ @autoserialize @relationship(ResourceType.Collection, true) collections: string[]; diff --git a/src/app/core/cache/models/normalized-item.model.ts b/src/app/core/cache/models/normalized-item.model.ts index d6e9165471..7d518bd048 100644 --- a/src/app/core/cache/models/normalized-item.model.ts +++ b/src/app/core/cache/models/normalized-item.model.ts @@ -5,6 +5,9 @@ import { Item } from '../../shared/item.model'; import { mapsTo, relationship } from '../builders/build-decorators'; import { ResourceType } from '../../shared/resource-type'; +/** + * Normalized model class for a DSpace Item + */ @mapsTo(Item) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedItem extends NormalizedDSpaceObject { @@ -53,6 +56,9 @@ export class NormalizedItem extends NormalizedDSpaceObject { @relationship(ResourceType.Collection, false) owningCollection: string; + /** + * List of Bitstreams that are owned by this Item + */ @autoserialize @relationship(ResourceType.Bitstream, true) bitstreams: string[]; diff --git a/src/app/core/cache/models/normalized-resource-policy.model.ts b/src/app/core/cache/models/normalized-resource-policy.model.ts index 3a874da46b..b767ca6491 100644 --- a/src/app/core/cache/models/normalized-resource-policy.model.ts +++ b/src/app/core/cache/models/normalized-resource-policy.model.ts @@ -1,23 +1,49 @@ import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize'; import { ResourcePolicy } from '../../shared/resource-policy.model'; -import { mapsTo } from '../builders/build-decorators'; -import { IDToUUIDSerializer } from '../it-to-uuid-serializer'; +import { mapsTo, relationship } from '../builders/build-decorators'; import { NormalizedObject } from './normalized-object.model'; +import { IDToUUIDSerializer } from '../id-to-uuid-serializer'; +import { ResourceType } from '../../shared/resource-type'; +import { ActionType } from './action-type.model'; +/** + * Normalized model class for a Resource Policy + */ @mapsTo(ResourcePolicy) @inheritSerialization(NormalizedObject) export class NormalizedResourcePolicy extends NormalizedObject { + /** + * The action that is allowed by this Resource Policy + */ + action: ActionType; + + /** + * The name for this Resource Policy + */ @autoserialize name: string; + /** + * The uuid of the Group this Resource Policy applies to + */ + @relationship(ResourceType.Group, false) @autoserializeAs(String, 'groupUUID') group: string; + /** + * Identifier for this Resource Policy + * Note that this ID is unique for resource policies, + * but might not be unique across different object types + */ @autoserialize id: string; + /** + * The universally unique identifier for this Resource Policy + * Consist of a prefix and the id field to ensure the identifier is unique across all object types + */ @autoserializeAs(new IDToUUIDSerializer('resource-policy'), 'id') uuid: string; } diff --git a/src/app/core/cache/models/support-level.model.ts b/src/app/core/cache/models/support-level.model.ts new file mode 100644 index 0000000000..30f759d55f --- /dev/null +++ b/src/app/core/cache/models/support-level.model.ts @@ -0,0 +1,19 @@ +/** + * Enum representing the Support Level of a Bitstream Format + */ +export enum SupportLevel { + /** + * Unknown for Bitstream Formats that are unknown to the system + */ + Unknown = 0, + + /** + * Unknown for Bitstream Formats that are known to the system, but not fully supported + */ + Known = 1, + + /** + * Supported for Bitstream Formats that are known to the system and fully supported + */ + Supported = 2, +} diff --git a/src/app/core/shared/bitstream-format.model.ts b/src/app/core/shared/bitstream-format.model.ts index 0089abce4a..9af345e607 100644 --- a/src/app/core/shared/bitstream-format.model.ts +++ b/src/app/core/shared/bitstream-format.model.ts @@ -2,24 +2,54 @@ import { CacheableObject } from '../cache/object-cache.reducer'; import { ResourceType } from './resource-type'; +/** + * Model class for a Bitstream Format + */ export class BitstreamFormat implements CacheableObject { + /** + * Short description of this Bitstream Format + */ shortDescription: string; + /** + * Description of this Bitstream Format + */ description: string; + /** + * String representing the MIME type of this Bitstream Format + */ mimetype: string; + /** + * The level of support the system offers for this Bitstream Format + */ supportLevel: number; + /** + * True if the Bitstream Format is used to store system information, rather than the content of items in the system + */ internal: boolean; + /** + * String representing this Bitstream Format's file extension + */ extensions: string; + /** + * The link to the rest endpoint where this Bitstream Format can be found + */ self: string; + /** + * A ResourceType representing the kind of Object of this BitstreamFormat + */ type: ResourceType; + /** + * Universally unique identifier for this Bitstream Format + */ uuid: string; } diff --git a/src/app/core/shared/resource-policy.model.ts b/src/app/core/shared/resource-policy.model.ts index 3bca324a47..cccbea1e89 100644 --- a/src/app/core/shared/resource-policy.model.ts +++ b/src/app/core/shared/resource-policy.model.ts @@ -1,20 +1,40 @@ - import { CacheableObject } from '../cache/object-cache.reducer'; import { ResourceType } from './resource-type'; +import { Group } from '../eperson/models/group.model'; +import { ActionType } from '../cache/models/action-type.model'; +/** + * Model class for a Resource Policy + */ export class ResourcePolicy implements CacheableObject { + /** + * The action that is allowed by this Resource Policy + */ + action: ActionType; - action: string; - + /** + * The name for this Resource Policy + */ name: string; - // TODO group should ofcourse become a group object - group: string; + /** + * The Group this Resource Policy applies to + */ + group: Group; + /** + * The link to the rest endpoint where this Resource Policy can be found + */ self: string; + /** + * A ResourceType representing the kind of Object of this ResourcePolicy + */ type: ResourceType; + /** + * The universally unique identifier for this Resource Policy + */ uuid: string; } From a4855ce9ea6bdd4eecd62999a21ef63e64b5a952 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 9 Aug 2018 11:50:42 +0200 Subject: [PATCH 6/6] fixed some tests after merge --- .../core/cache/id-to-uuid-serializer.spec.ts | 2 +- ...tegration-response-parsing.service.spec.ts | 35 +++++++++++-------- .../integration-response-parsing.service.ts | 2 +- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/app/core/cache/id-to-uuid-serializer.spec.ts b/src/app/core/cache/id-to-uuid-serializer.spec.ts index 662d79cdce..e7f6929ddd 100644 --- a/src/app/core/cache/id-to-uuid-serializer.spec.ts +++ b/src/app/core/cache/id-to-uuid-serializer.spec.ts @@ -1,4 +1,4 @@ -import { IDToUUIDSerializer } from './it-to-uuid-serializer'; +import { IDToUUIDSerializer } from './id-to-uuid-serializer'; describe('IDToUUIDSerializer', () => { let serializer: IDToUUIDSerializer; diff --git a/src/app/core/integration/integration-response-parsing.service.spec.ts b/src/app/core/integration/integration-response-parsing.service.spec.ts index e2e2f92d5a..9c3e5b0344 100644 --- a/src/app/core/integration/integration-response-parsing.service.spec.ts +++ b/src/app/core/integration/integration-response-parsing.service.spec.ts @@ -8,6 +8,8 @@ import { CoreState } from '../core.reducers'; import { IntegrationResponseParsingService } from './integration-response-parsing.service'; import { IntegrationRequest } from '../data/request.models'; import { AuthorityValueModel } from './models/authority-value.model'; +import { PageInfo } from '../shared/page-info.model'; +import { PaginatedList } from '../data/paginated-list'; describe('IntegrationResponseParsingService', () => { let service: IntegrationResponseParsingService; @@ -78,7 +80,7 @@ describe('IntegrationResponseParsingService', () => { }, _links: { - self: 'https://rest.api/integration/authorities/type/entries' + self: { href: 'https://rest.api/integration/authorities/type/entries' } } }, statusCode: '200' @@ -141,39 +143,44 @@ describe('IntegrationResponseParsingService', () => { }, statusCode: '200' }; - - const definitions = [ - Object.assign(new AuthorityValueModel(), { + const pageinfo = Object.assign(new PageInfo(), { elementsPerPage: 5, totalElements: 5, totalPages: 1, currentPage: 1 }); + const definitions = new PaginatedList(pageinfo,[ + Object.assign({}, new AuthorityValueModel(), { + type: 'authority', display: 'One', id: 'One', - otherInformation: {}, + otherInformation: undefined, value: 'One' }), - Object.assign(new AuthorityValueModel(), { + Object.assign({}, new AuthorityValueModel(), { + type: 'authority', display: 'Two', id: 'Two', - otherInformation: {}, + otherInformation: undefined, value: 'Two' }), - Object.assign(new AuthorityValueModel(), { + Object.assign({}, new AuthorityValueModel(), { + type: 'authority', display: 'Three', id: 'Three', - otherInformation: {}, + otherInformation: undefined, value: 'Three' }), - Object.assign(new AuthorityValueModel(), { + Object.assign({}, new AuthorityValueModel(), { + type: 'authority', display: 'Four', id: 'Four', - otherInformation: {}, + otherInformation: undefined, value: 'Four' }), - Object.assign(new AuthorityValueModel(), { + Object.assign({}, new AuthorityValueModel(), { + type: 'authority', display: 'Five', id: 'Five', - otherInformation: {}, + otherInformation: undefined, value: 'Five' }) - ]; + ]); it('should return a IntegrationSuccessResponse if data contains a valid endpoint response', () => { const response = service.parse(validRequest, validResponse); diff --git a/src/app/core/integration/integration-response-parsing.service.ts b/src/app/core/integration/integration-response-parsing.service.ts index 5d6ce09114..06c6b9620d 100644 --- a/src/app/core/integration/integration-response-parsing.service.ts +++ b/src/app/core/integration/integration-response-parsing.service.ts @@ -33,7 +33,7 @@ export class IntegrationResponseParsingService extends BaseResponseParsingServic parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse { if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links)) { const dataDefinition = this.process(data.payload, request.href); - return new IntegrationSuccessResponse(dataDefinition[Object.keys(dataDefinition)[0]], data.statusCode, this.processPageInfo(data.payload.page)); + return new IntegrationSuccessResponse(dataDefinition, data.statusCode, this.processPageInfo(data.payload.page)); } else { return new ErrorResponse( Object.assign(