mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
upgrade 'create folder' action
This commit is contained in:
@@ -96,15 +96,12 @@ export class DocumentListService {
|
||||
|
||||
/**
|
||||
* Create a new folder in the path.
|
||||
* @param name
|
||||
* @param path
|
||||
* @param name Folder name
|
||||
* @param parentId Parent folder ID
|
||||
* @returns {any}
|
||||
*/
|
||||
createFolder(name: string, path: string): Observable<any> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, path))
|
||||
.map(res => {
|
||||
return res;
|
||||
})
|
||||
createFolder(name: string, parentId: string): Observable<MinimalNodeEntity> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, '/', parentId))
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user