def post(self, group_id, shopping_list_id): """Füge alle Standardartikel einer Gruppe zu einer Einkaufslite hinzu.""" adm = Administration() grp = adm.get_group_by_id(group_id) sl = adm.get_shopping_list_by_id(shopping_list_id) if grp is not None and sl is not None: adm.add_standardarticle_to_shopping_list(grp, sl) return "Standardarticles added to Group!", 200 else: return "Group or ShoppingList not found", 500
def post(self, group_id, shopping_list_id): """Füge einen bestimmten Standardartikel einer bestimmten Shoppingliste hinzu.""" adm = Administration() grp = adm.get_group_by_id(group_id) sl = adm.get_shopping_list_by_id(shopping_list_id) if grp is not None and sl is not None: result = adm.add_standardarticle_to_shopping_list(sl, grp) return result else: return "Group or ShoppingList not found", 500