[ACA-986] fix ts error (#68)

* fix ts error

* another fix
This commit is contained in:
Adina Parpalita
2017-11-21 08:26:46 +02:00
committed by Cilibiu Bogdan
parent 892b49046f
commit b189945627
@@ -48,12 +48,9 @@ export class NodesApi extends RepoApi {
} }
getNodeDescription(name: string): Promise<string> { getNodeDescription(name: string): Promise<string> {
let description = 'cm:description'; return this.getNodeByPath(name)
.then(response => response.data.entry.properties['cm:description'])
return this .catch(() => Promise.resolve(''));
.getNodeByPath(name)
.then((response: any): string => response.data.entry.properties[description])
.catch(this.handleError);
} }
deleteNodes(names: string[], relativePath: string = '', permanent: boolean = true): Promise<any> { deleteNodes(names: string[], relativePath: string = '', permanent: boolean = true): Promise<any> {