Skip to content

Commit c4473ad

Browse files
Merge pull request #13 from GabrielTorelo/feat/gameController
feat/gameController#002 - OK
2 parents c0a078d + b831c93 commit c4473ad

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
import java.util.List;
44
import org.springframework.beans.factory.annotation.Autowired;
55
import org.springframework.web.bind.annotation.GetMapping;
6+
import org.springframework.web.bind.annotation.PathVariable;
67
import org.springframework.web.bind.annotation.RequestMapping;
78
import org.springframework.web.bind.annotation.RestController;
9+
import com.gabriel_torelo.game_list.dto.GameLongDTO;
810
import com.gabriel_torelo.game_list.dto.GameMinDTO;
11+
import com.gabriel_torelo.game_list.dto.GameShortDTO;
912
import 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
}

0 commit comments

Comments
 (0)