mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
fix bug
This commit is contained in:
parent
85efa4b416
commit
8a75e94413
@ -24,8 +24,7 @@ let OwnershipFetcher = {
|
||||
},
|
||||
|
||||
makeContractPublic(contractObj){
|
||||
console.log(contractObj);
|
||||
return requests.put('ownership_contract_list',{ body: contractObj, contract_id:contractObj.id });
|
||||
return requests.put('ownership_contract', { body: contractObj, contract_id: contractObj.id });
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,6 @@ class Requests {
|
||||
throw new Error(`Cannot find a mapping for "${name}"`);
|
||||
}
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
@ -138,9 +137,10 @@ class Requests {
|
||||
return this.request('delete', newUrl);
|
||||
}
|
||||
|
||||
_putOrPost(url,paramsAndBody,method){
|
||||
_putOrPost(url, paramsAndBody, method){
|
||||
let paramsCopy = this._merge(paramsAndBody);
|
||||
let params = excludePropFromObject(paramsAndBody,['body']);
|
||||
|
||||
let newUrl = this.prepareUrl(url, params);
|
||||
let body = null;
|
||||
if (paramsCopy && paramsCopy.body) {
|
||||
@ -155,7 +155,6 @@ class Requests {
|
||||
}
|
||||
|
||||
put(url, params){
|
||||
console.log(params);
|
||||
return this._putOrPost(url,params,'put')
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user