File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/main/java/com/gabriel_torelo/game_list/controllers Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 33import java .util .List ;
44import org .springframework .beans .factory .annotation .Autowired ;
55import org .springframework .web .bind .annotation .GetMapping ;
6+ import org .springframework .web .bind .annotation .PathVariable ;
67import org .springframework .web .bind .annotation .RequestMapping ;
78import org .springframework .web .bind .annotation .RestController ;
9+ import com .gabriel_torelo .game_list .dto .GameLongDTO ;
810import com .gabriel_torelo .game_list .dto .GameMinDTO ;
11+ import com .gabriel_torelo .game_list .dto .GameShortDTO ;
912import com .gabriel_torelo .game_list .services .GameService ;
1013
1114@ RestController
@@ -19,4 +22,14 @@ public class GameController {
1922 public List <GameMinDTO > readAll () {
2023 return gameService .readAll ();
2124 }
25+
26+ @ GetMapping (value = "/{id}" )
27+ public GameShortDTO readID (@ PathVariable Long id ) {
28+ return gameService .readID (id );
29+ }
30+
31+ @ GetMapping (value = "/{id}/more_about" )
32+ public GameLongDTO readMoreID (@ PathVariable Long id ) {
33+ return gameService .readMoreID (id );
34+ }
2235}
You can’t perform that action at this time.
0 commit comments