Changed DataService's create method in the way to accept array of request params

This commit is contained in:
Giuseppe Digilio
2020-04-02 19:54:30 +02:00
parent 41d6255998
commit b9de6a7a7d
2 changed files with 33 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ import { getSucceededRemoteData } from '../../../core/shared/operators';
import { ResourceType } from '../../../core/shared/resource-type';
import { hasValue, isNotEmpty, isNotUndefined } from '../../empty.util';
import { NotificationsService } from '../../notifications/notifications.service';
import { RequestParam } from '../../../core/cache/models/request-param.model';
/**
* Component representing the create page for communities and collections
@@ -76,7 +77,7 @@ export class CreateComColPageComponent<TDomain extends DSpaceObject> implements
const uploader = event.uploader;
this.parentUUID$.pipe(take(1)).subscribe((uuid: string) => {
this.dsoDataService.create(dso, uuid)
this.dsoDataService.create(dso, new RequestParam('parent', uuid))
.pipe(getSucceededRemoteData())
.subscribe((dsoRD: RemoteData<TDomain>) => {
if (isNotUndefined(dsoRD)) {