Skip to content

Commit 9d6b7d5

Browse files
Merge pull request #23 from GabrielTorelo/feat/gameListController
feat/gameListController#002 - OK
2 parents bdf6819 + cbf285a commit 9d6b7d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/com/gabriel_torelo/game_list/controllers/GameListController.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
import org.springframework.web.bind.annotation.RequestMapping;
88
import org.springframework.web.bind.annotation.RestController;
99
import com.gabriel_torelo.game_list.dto.GameListDTO;
10+
import com.gabriel_torelo.game_list.dto.GameMinDTO;
1011
import com.gabriel_torelo.game_list.services.GameListService;
12+
import com.gabriel_torelo.game_list.services.GameService;
1113

1214
@RestController
1315
@RequestMapping(value = "/lists")
@@ -16,6 +18,9 @@ public class GameListController {
1618
@Autowired
1719
private GameListService gameListService;
1820

21+
@Autowired
22+
private GameService gameService;
23+
1924
@GetMapping
2025
public List<GameListDTO> readAll() {
2126
return gameListService.readAll();
@@ -25,4 +30,9 @@ public List<GameListDTO> readAll() {
2530
public GameListDTO readID(@PathVariable Long id) {
2631
return gameListService.readID(id);
2732
}
33+
34+
@GetMapping(value = "/{id}/games")
35+
public List<GameMinDTO> readListID(@PathVariable Long id) {
36+
return gameService.readListID(id);
37+
}
2838
}

0 commit comments

Comments
 (0)