1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

feat: Improve Public URL Readability (#2482)

* added support for group slugs

* modified frontend to use links with group slug

* fixed test refs

* unused import

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Genson 2023-08-20 13:38:46 -05:00 committed by GitHub
parent 99372aa2b6
commit 095edef95e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 166 additions and 18 deletions

View file

@ -34,6 +34,8 @@ def test_public_recipe_success(
test_case: PublicRecipeTestCase,
):
group = database.groups.get_one(unique_user.group_id)
assert group
group.preferences.private_group = test_case.private_group
database.group_preferences.update(group.id, group.preferences)
@ -42,9 +44,10 @@ def test_public_recipe_success(
database.recipes.update(random_recipe.slug, random_recipe)
# Try to access recipe
recipe_group = database.groups.get_by_slug_or_id(random_recipe.group_id)
response = api_client.get(
api_routes.explore_recipes_group_id_recipe_slug(
random_recipe.group_id,
api_routes.explore_recipes_group_slug_recipe_slug(
recipe_group.slug,
random_recipe.slug,
)
)