mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 12:33:07 +00:00
commented out the create method until the spec for POST responses is final
This commit is contained in:
@@ -110,20 +110,21 @@ export abstract class DataService<TNormalized extends CacheableObject, TDomain>
|
|||||||
return this.rdbService.buildSingle<TNormalized, TDomain>(href, this.normalizedResourceType);
|
return this.rdbService.buildSingle<TNormalized, TDomain>(href, this.normalizedResourceType);
|
||||||
}
|
}
|
||||||
|
|
||||||
create(dso: DSpaceObject): Observable<RemoteData<TDomain>> {
|
// TODO implement, after the structure of the REST server's POST response is finalized
|
||||||
const postHrefObs = this.getEndpoint();
|
// create(dso: DSpaceObject): Observable<RemoteData<TDomain>> {
|
||||||
|
// const postHrefObs = this.getEndpoint();
|
||||||
// TODO ID is unknown at this point
|
//
|
||||||
const idHrefObs = postHrefObs.map((href: string) => this.getFindByIDHref(href, dso.id));
|
// // TODO ID is unknown at this point
|
||||||
|
// const idHrefObs = postHrefObs.map((href: string) => this.getFindByIDHref(href, dso.id));
|
||||||
postHrefObs
|
//
|
||||||
.filter((href: string) => hasValue(href))
|
// postHrefObs
|
||||||
.take(1)
|
// .filter((href: string) => hasValue(href))
|
||||||
.subscribe((href: string) => {
|
// .take(1)
|
||||||
const request = new RestRequest(this.requestService.generateRequestId(), href, RestRequestMethod.Post, dso);
|
// .subscribe((href: string) => {
|
||||||
this.requestService.configure(request);
|
// const request = new RestRequest(this.requestService.generateRequestId(), href, RestRequestMethod.Post, dso);
|
||||||
});
|
// this.requestService.configure(request);
|
||||||
|
// });
|
||||||
return this.rdbService.buildSingle<TNormalized, TDomain>(idHrefObs, this.normalizedResourceType);
|
//
|
||||||
}
|
// return this.rdbService.buildSingle<TNormalized, TDomain>(idHrefObs, this.normalizedResourceType);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user