Commit 0fd4f768 authored by Nicolas Lenz's avatar Nicolas Lenz
Browse files

Fix token headers for new version

parent 547c5225
......@@ -69,7 +69,7 @@ def read_recipe(input: dict) -> Recipe:
def list_recipe_ids() -> list[int]:
r = requests.get(
f"https://recipes.eisfunke.com/api/recipe/",
headers={"Authorization": f"Token {token}"},
headers={"Authorization": f"Bearer {token}"},
json={"page_size": 0},
)
......@@ -82,7 +82,7 @@ def list_recipe_ids() -> list[int]:
def get_recipe(id: int) -> Recipe:
r = requests.get(
f"{instance}/api/recipe/{id}/",
headers={"Authorization": f"Token {token}"},
headers={"Authorization": f"Bearer {token}"},
)
if r.status_code != requests.codes.ok:
......@@ -104,7 +104,7 @@ def make_recipe(recipe: Recipe):
r = requests.get(
recipe.image_url,
headers={"Authorization": f"Token {token}"},
headers={"Authorization": f"Bearer {token}"},
)
if r.status_code != requests.codes.ok:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment