From c4eebaccca17840317c0d8cf442bf45d9dee0a6c Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sat, 31 Dec 2022 01:09:22 -0600 Subject: [PATCH] Fix for shopping list recipe delete route (#1954) * fixed broken types * changed remove recipe route from delete to post --- frontend/lib/api/user/group-shopping-lists.ts | 5 +++-- .../groups/controller_shopping_lists.py | 2 +- .../test_group_shopping_lists.py | 20 ++++++++++--------- tests/utils/api_routes/__init__.py | 5 +++++ tests/utils/assertion_helpers.py | 4 ++-- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/frontend/lib/api/user/group-shopping-lists.ts b/frontend/lib/api/user/group-shopping-lists.ts index f4100c7f..4b906753 100644 --- a/frontend/lib/api/user/group-shopping-lists.ts +++ b/frontend/lib/api/user/group-shopping-lists.ts @@ -15,6 +15,7 @@ const routes = { shoppingLists: `${prefix}/groups/shopping/lists`, shoppingListsId: (id: string) => `${prefix}/groups/shopping/lists/${id}`, shoppingListIdAddRecipe: (id: string, recipeId: string) => `${prefix}/groups/shopping/lists/${id}/recipe/${recipeId}`, + shoppingListIdRemoveRecipe: (id: string, recipeId: string) => `${prefix}/groups/shopping/lists/${id}/recipe/${recipeId}/delete`, shoppingListItems: `${prefix}/groups/shopping/items`, shoppingListItemsId: (id: string) => `${prefix}/groups/shopping/items/${id}`, @@ -28,8 +29,8 @@ export class ShoppingListsApi extends BaseCRUDAPI None: +def assert_ignore_keys(dict1: dict, dict2: dict, ignore_keys: list | None = None) -> None: """ Itterates through a list of keys and checks if they are in the the provided ignore_keys list, if they are not in the ignore_keys list, it checks the value of the key in the provided against