From 6b9bf039414be7f9c5b90d0bf53cd2dcdba33ae6 Mon Sep 17 00:00:00 2001 From: Cevo Date: Mon, 7 Sep 2015 15:08:01 +0200 Subject: [PATCH] tabs inserted in jsx --- js/actions/contract_list_actions.js | 2 -- js/components/ascribe_settings/contract_settings.js | 6 +++--- js/fetchers/ownership_fetcher.js | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/js/actions/contract_list_actions.js b/js/actions/contract_list_actions.js index b9dad5db..7df5d549 100644 --- a/js/actions/contract_list_actions.js +++ b/js/actions/contract_list_actions.js @@ -28,11 +28,9 @@ class ContractListActions { return Q.Promise((resolve, reject) => { OwnershipFetcher.makeContractPublic(contract) .then((res) => { - console.log('Here is the result... '); resolve(res); }) .catch((err)=> { - console.log('Here we have an error'); console.logGlobal(err); reject(err); }); diff --git a/js/components/ascribe_settings/contract_settings.js b/js/components/ascribe_settings/contract_settings.js index 9a345605..919c1960 100644 --- a/js/components/ascribe_settings/contract_settings.js +++ b/js/components/ascribe_settings/contract_settings.js @@ -35,8 +35,8 @@ let ContractSettings = React.createClass({ console.log(contract); ContractListActions.makeContractPublic(contract) .then(( ) => ContractListActions.fetchContractList()) - .catch((error)=>{console.log('Error ', error); - let notification = new GlobalNotificationModel('Service is unavailable', 'danger', 10000); + .catch((error)=>{ + let notification = new GlobalNotificationModel(error, 'danger', 10000); GlobalNotificationActions.appendGlobalNotification(notification); }); }, @@ -45,7 +45,7 @@ let ContractSettings = React.createClass({ ContractListActions.removeContract(contract) .then(( ) => ContractListActions.fetchContractList()) .catch((error) => {console.log('Error', error); - let notification = new GlobalNotificationModel('Service is unavailable', 'danger', 10000); + let notification = new GlobalNotificationModel(error, 'danger', 10000); GlobalNotificationActions.appendGlobalNotification(notification); }); }, diff --git a/js/fetchers/ownership_fetcher.js b/js/fetchers/ownership_fetcher.js index 751790ba..e698e199 100644 --- a/js/fetchers/ownership_fetcher.js +++ b/js/fetchers/ownership_fetcher.js @@ -24,7 +24,7 @@ let OwnershipFetcher = { }, makeContractPublic(contractObj){ - return requests.put('ownership_contract', { body: contractObj, contract_id: contractObj.id }); + return requests.put('ownership_csontract', { body: contractObj, contract_id: contractObj.id }); }, deleteContract(contractObj){