Fixed post params

This commit is contained in:
Lukian 2024-12-29 15:10:00 +01:00
parent 4491e5180a
commit b3b7a3ca2b
2 changed files with 2 additions and 2 deletions

View file

@ -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()

View file

@ -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()