1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 18:35:09 +01:00
This commit is contained in:
Tim Daubenschütz 2015-09-04 16:24:29 +02:00
parent 85efa4b416
commit 8a75e94413
2 changed files with 3 additions and 5 deletions

View File

@ -24,8 +24,7 @@ let OwnershipFetcher = {
}, },
makeContractPublic(contractObj){ makeContractPublic(contractObj){
console.log(contractObj); return requests.put('ownership_contract', { body: contractObj, contract_id: contractObj.id });
return requests.put('ownership_contract_list',{ body: contractObj, contract_id:contractObj.id });
} }
}; };

View File

@ -78,7 +78,6 @@ class Requests {
throw new Error(`Cannot find a mapping for "${name}"`); throw new Error(`Cannot find a mapping for "${name}"`);
} }
} }
return url; return url;
} }
@ -138,9 +137,10 @@ class Requests {
return this.request('delete', newUrl); return this.request('delete', newUrl);
} }
_putOrPost(url,paramsAndBody,method){ _putOrPost(url, paramsAndBody, method){
let paramsCopy = this._merge(paramsAndBody); let paramsCopy = this._merge(paramsAndBody);
let params = excludePropFromObject(paramsAndBody,['body']); let params = excludePropFromObject(paramsAndBody,['body']);
let newUrl = this.prepareUrl(url, params); let newUrl = this.prepareUrl(url, params);
let body = null; let body = null;
if (paramsCopy && paramsCopy.body) { if (paramsCopy && paramsCopy.body) {
@ -155,7 +155,6 @@ class Requests {
} }
put(url, params){ put(url, params){
console.log(params);
return this._putOrPost(url,params,'put') return this._putOrPost(url,params,'put')
} }