From 1f34a355bcc623a02df91a746b6189a72b565752 Mon Sep 17 00:00:00 2001 From: bekodeg Date: Tue, 21 May 2024 15:20:41 +0400 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/demo/tables/api/TableController.java | 1 + demo/src/main/java/com/example/demo/tables/api/TableDTO.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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;