diff --git a/demo/src/main/java/com/example/demo/tables/api/TableController.java b/demo/src/main/java/com/example/demo/tables/api/TableController.java index cf2de89..e3c9099 100644 --- a/demo/src/main/java/com/example/demo/tables/api/TableController.java +++ b/demo/src/main/java/com/example/demo/tables/api/TableController.java @@ -27,6 +27,7 @@ public class TableController { private TableDTO toDTO(TableEntity entity) { return new TableDTO( + entity.getId(), entity.getDescription(), entity.getDate(), modelMapper.map(entity.getCreator(), UserDTO.class), diff --git a/demo/src/main/java/com/example/demo/tables/api/TableDTO.java b/demo/src/main/java/com/example/demo/tables/api/TableDTO.java index 2c60a57..480c9d3 100644 --- a/demo/src/main/java/com/example/demo/tables/api/TableDTO.java +++ b/demo/src/main/java/com/example/demo/tables/api/TableDTO.java @@ -23,7 +23,8 @@ public class TableDTO { private GameDTO game; private List gamers; - public TableDTO(String description, Date date, UserDTO creator, GameDTO game, List gamers){ + public TableDTO(Long id, String description, Date date, UserDTO creator, GameDTO game, List gamers){ + this.id = id; this.description = description; this.date = date; this.creator = creator;