From eb3748829631dad0dae3a08490bb0f7aaa95548c Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Thu, 11 Jan 2018 10:40:31 +0100 Subject: [PATCH] commented out the create method until the spec for POST responses is final --- src/app/core/data/data.service.ts | 33 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/app/core/data/data.service.ts b/src/app/core/data/data.service.ts index 3e86bb21b0..8cdcac1796 100644 --- a/src/app/core/data/data.service.ts +++ b/src/app/core/data/data.service.ts @@ -110,20 +110,21 @@ export abstract class DataService return this.rdbService.buildSingle(href, this.normalizedResourceType); } - create(dso: DSpaceObject): Observable> { - const postHrefObs = this.getEndpoint(); - - // TODO ID is unknown at this point - const idHrefObs = postHrefObs.map((href: string) => this.getFindByIDHref(href, dso.id)); - - postHrefObs - .filter((href: string) => hasValue(href)) - .take(1) - .subscribe((href: string) => { - const request = new RestRequest(this.requestService.generateRequestId(), href, RestRequestMethod.Post, dso); - this.requestService.configure(request); - }); - - return this.rdbService.buildSingle(idHrefObs, this.normalizedResourceType); - } + // TODO implement, after the structure of the REST server's POST response is finalized + // create(dso: DSpaceObject): Observable> { + // const postHrefObs = this.getEndpoint(); + // + // // TODO ID is unknown at this point + // const idHrefObs = postHrefObs.map((href: string) => this.getFindByIDHref(href, dso.id)); + // + // postHrefObs + // .filter((href: string) => hasValue(href)) + // .take(1) + // .subscribe((href: string) => { + // const request = new RestRequest(this.requestService.generateRequestId(), href, RestRequestMethod.Post, dso); + // this.requestService.configure(request); + // }); + // + // return this.rdbService.buildSingle(idHrefObs, this.normalizedResourceType); + // } }