Skip to content
Snippets Groups Projects
Commit 0e058aa1 authored by Anders Montsko Austlid's avatar Anders Montsko Austlid
Browse files

Merge branch 'bugfix/shoppinglist-group-delete-wrong-parameter' into 'main'

Wrong parameter name in shoppinglist delete by group ID endpoint

See merge request idatt2106-v23-03/backend!176
parents c484d738 bd577d85
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ public class ShoppingListController { ...@@ -56,7 +56,7 @@ public class ShoppingListController {
* @return the shopping list, or an error if the ID is invalid * @return the shopping list, or an error if the ID is invalid
*/ */
@GetMapping("/group/{groupId}") @GetMapping("/group/{groupId}")
public ResponseEntity<ShoppingList> getAllShoppingListsByGroupId(@PathVariable("id") long id) { public ResponseEntity<ShoppingList> getAllShoppingListsByGroupId(@PathVariable("groupId") long id) {
Optional<ShoppingList> shoppingList = shoppingListService.getShoppingListByGroupId(id); Optional<ShoppingList> shoppingList = shoppingListService.getShoppingListByGroupId(id);
return shoppingList.map(list -> ResponseEntity.status(HttpStatus.OK).body(list)) return shoppingList.map(list -> ResponseEntity.status(HttpStatus.OK).body(list))
.orElseGet(() -> ResponseEntity.status(HttpStatus.NOT_FOUND).build()); .orElseGet(() -> ResponseEntity.status(HttpStatus.NOT_FOUND).build());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment