generated from lucien/api-template
Fixed post url
This commit is contained in:
parent
b3b7a3ca2b
commit
e7970f953d
1 changed files with 3 additions and 3 deletions
|
@ -18,8 +18,8 @@ def getShares(idComp):
|
|||
- idComp : identifiant de l'entreprise
|
||||
- price : prix de l'action sur le marché
|
||||
"""
|
||||
def emmitShare(idComp, price):
|
||||
url = HOST + 'api/shares/emmit'
|
||||
def emitShare(idComp, price):
|
||||
url = HOST + 'api/shares/emit'
|
||||
obj={'company_id':idComp,'price':price}
|
||||
r = requests.post(url, json=obj)
|
||||
return r.json()
|
||||
|
@ -46,7 +46,7 @@ if __name__ == "__main__":
|
|||
for company in companies:
|
||||
price = randint(20, 2000)
|
||||
for i in range(randint(0, 10)):
|
||||
emmitShare(company["id"], price)
|
||||
emitShare(company["id"], price)
|
||||
|
||||
sleep(30)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue