File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/main/java/com/gabriel_torelo/game_list/controllers Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .gabriel_torelo .game_list .controllers ;
2+
3+ import java .util .List ;
4+ import org .springframework .beans .factory .annotation .Autowired ;
5+ import org .springframework .web .bind .annotation .GetMapping ;
6+ import org .springframework .web .bind .annotation .PathVariable ;
7+ import org .springframework .web .bind .annotation .RequestMapping ;
8+ import org .springframework .web .bind .annotation .RestController ;
9+ import com .gabriel_torelo .game_list .dto .GameListDTO ;
10+ import com .gabriel_torelo .game_list .services .GameListService ;
11+
12+ @ RestController
13+ @ RequestMapping (value = "/lists" )
14+ public class GameListController {
15+
16+ @ Autowired
17+ private GameListService gameListService ;
18+
19+ @ GetMapping
20+ public List <GameListDTO > readAll () {
21+ return gameListService .readAll ();
22+ }
23+
24+ @ GetMapping (value = "/{id}" )
25+ public GameListDTO readID (@ PathVariable Long id ) {
26+ return gameListService .readID (id );
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments