diff --git a/server/src/main/java/com/vpr/server/EventRepository.java b/server/src/main/java/com/vpr/server/EventRepository.java index d3f1c77..7f9b86e 100644 --- a/server/src/main/java/com/vpr/server/EventRepository.java +++ b/server/src/main/java/com/vpr/server/EventRepository.java @@ -9,7 +9,9 @@ import java.util.List; // CRUD refers Create, Read, Update, Delete public interface EventRepository extends CrudRepository { - @Query(value = "SELECT e.id AS eid, e.name AS ename, u.id AS uid, u.forename, u.name AS uname " + + @Query(value = "SELECT e.id AS eid, e.name AS ename, e.start, e.end, e.priority , e.is_full_day, " + + "ue.date, " + + "u.id AS uid, u.forename, u.name AS uname " + "FROM event e " + "INNER JOIN user_event ue " + "ON e.id = ue.event_id " + diff --git a/server/src/main/java/com/vpr/server/MainController.java b/server/src/main/java/com/vpr/server/MainController.java index d7bafc6..2afbf77 100644 --- a/server/src/main/java/com/vpr/server/MainController.java +++ b/server/src/main/java/com/vpr/server/MainController.java @@ -58,10 +58,11 @@ public class MainController { return eventRepository.findAllVisibleByUserId(userId); } - // GET-request at /all-events - // returns JSON-data + @GetMapping(path="/all-events-test") public @ResponseBody Iterable getAllEventsTest() { return eventRepository.findAll(); } + + } \ No newline at end of file