Commit e57edcd0 authored by Moises Sacal's avatar Moises Sacal
Browse files

updating link with no permissions for issue #21

parent 1afe3e5e
......@@ -2,7 +2,7 @@ declare var module;
declare var sails, Model;
declare var _;
import {Observable} from 'rxjs/Rx';
import {Observable} from 'rxjs';
import 'rxjs/add/operator/map';
declare var BrandingService, WorkspaceService, LabarchivesService;
......@@ -161,6 +161,7 @@ export module Controllers {
.flatMap(response => {
sails.log.debug('insertNode');
sails.log.debug(response);
if (response && response['tree-tools']) {
const tree = response['tree-tools'];
const node = tree['node'];
metadataContent = `
......@@ -176,6 +177,7 @@ export module Controllers {
this.config.key, info['id'], nbId, node['tree-id'], partType, metadataContent
);
return Observable.fromPromise(insertNode);
} else return Observable.throwError(new Error('cannot insert node'));
})
.flatMap(response => {
if (recordMetadata.workspaces) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment