From 859e1314d22c0faef53cca0f3229231ab2dc1ac9 Mon Sep 17 00:00:00 2001 From: Teller501 Date: Mon, 11 Dec 2023 14:07:17 +0100 Subject: [PATCH] addes @Param to isUserParticipatingInEvent --- .../repository/UserEventDetailsRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dk/kea/onav2ndproject_rest/repository/UserEventDetailsRepository.java b/src/main/java/dk/kea/onav2ndproject_rest/repository/UserEventDetailsRepository.java index 6fc9a03..ab5172c 100644 --- a/src/main/java/dk/kea/onav2ndproject_rest/repository/UserEventDetailsRepository.java +++ b/src/main/java/dk/kea/onav2ndproject_rest/repository/UserEventDetailsRepository.java @@ -21,7 +21,7 @@ public interface UserEventDetailsRepository extends JpaRepository findByEventIdAndUserId(Integer eventId, int userId); @Query("SELECT CASE WHEN COUNT(ued) > 0 THEN true ELSE false END FROM UserEventDetails ued WHERE ued.user.id = :userId AND ued.event.id = :eventId AND ued.participating = true") - boolean isUserParticipatingInEvent(int userId, int eventId); + boolean isUserParticipatingInEvent(@Param("userId") int userId, @Param("eventId") int eventId); void deleteByUserId(int userId); }