We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c460ede + b639e89 commit 54a7a7bCopy full SHA for 54a7a7b
1 file changed
src/main/java/com/gabriel_torelo/game_list/controllers/GameController.java
@@ -0,0 +1,22 @@
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.RequestMapping;
7
+import org.springframework.web.bind.annotation.RestController;
8
+import com.gabriel_torelo.game_list.dto.GameMinDTO;
9
+import com.gabriel_torelo.game_list.services.GameService;
10
11
+@RestController
12
+@RequestMapping(value = "/games")
13
+public class GameController {
14
15
+ @Autowired
16
+ private GameService gameService;
17
18
+ @GetMapping
19
+ public List<GameMinDTO> readAll() {
20
+ return gameService.readAll();
21
+ }
22
+}
0 commit comments