diff --git a/src/main/java/com/gabriel_torelo/game_list/controllers/GameListController.java b/src/main/java/com/gabriel_torelo/game_list/controllers/GameListController.java index ffa5fc9..c3517e7 100644 --- a/src/main/java/com/gabriel_torelo/game_list/controllers/GameListController.java +++ b/src/main/java/com/gabriel_torelo/game_list/controllers/GameListController.java @@ -7,7 +7,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.gabriel_torelo.game_list.dto.GameListDTO; +import com.gabriel_torelo.game_list.dto.GameMinDTO; import com.gabriel_torelo.game_list.services.GameListService; +import com.gabriel_torelo.game_list.services.GameService; @RestController @RequestMapping(value = "/lists") @@ -16,6 +18,9 @@ public class GameListController { @Autowired private GameListService gameListService; + @Autowired + private GameService gameService; + @GetMapping public List readAll() { return gameListService.readAll(); @@ -25,4 +30,9 @@ public List readAll() { public GameListDTO readID(@PathVariable Long id) { return gameListService.readID(id); } + + @GetMapping(value = "/{id}/games") + public List readListID(@PathVariable Long id) { + return gameService.readListID(id); + } }