Update upload_controller.py

Increase limit of BF recipes to 50
next Steps: add offset parameter to start also with recipe 51,....
This commit is contained in:
avollkopf 2021-07-04 13:39:25 +02:00
parent f117835c2c
commit f62263e287

View file

@ -73,9 +73,9 @@ class UploadController:
if brewfather == True:
encodedData = base64.b64encode(bytes(f"{brewfather_user_id}:{brewfather_api_key}", "ISO-8859-1")).decode("ascii")
headers={"Authorization": "Basic %s" % encodedData}
parameters={"limit": 50}
async with aiohttp.ClientSession(headers=headers) as bf_session:
async with bf_session.get(self.url) as r:
async with bf_session.get(self.url, params=parameters) as r:
bf_recipe_list = await r.json()
await bf_session.close()