generated from lucien/api-template
Fixed post params
This commit is contained in:
parent
4491e5180a
commit
b3b7a3ca2b
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ def getShares(idComp):
|
||||||
"""
|
"""
|
||||||
def emmitShare(idComp, price):
|
def emmitShare(idComp, price):
|
||||||
url = HOST + 'api/shares/emmit'
|
url = HOST + 'api/shares/emmit'
|
||||||
obj={'id':idComp,'price':price}
|
obj={'company_id':idComp,'price':price}
|
||||||
r = requests.post(url, json=obj)
|
r = requests.post(url, json=obj)
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ HOST = "http://192.168.200.15/"
|
||||||
"""
|
"""
|
||||||
def buyShare(idBuyer, idShare, price):
|
def buyShare(idBuyer, idShare, price):
|
||||||
url = HOST + 'api/shares/buy'
|
url = HOST + 'api/shares/buy'
|
||||||
obj={'id':idBuyer,'share_id':idShare, 'price': price}
|
obj={'buyer_id':idBuyer,'share_id':idShare, 'price': price}
|
||||||
r = requests.post(url, json=obj)
|
r = requests.post(url, json=obj)
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue