From 7af81657eea066c1f25884398d589565e9820928 Mon Sep 17 00:00:00 2001 From: gventurini Date: Sun, 8 May 2022 21:29:04 +0200 Subject: [PATCH] fix wrong param passed to query --- src/main/kotlin/it/bot/repository/CommandCacheRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/it/bot/repository/CommandCacheRepository.kt b/src/main/kotlin/it/bot/repository/CommandCacheRepository.kt index 2c2c611..0ce1a20 100644 --- a/src/main/kotlin/it/bot/repository/CommandCacheRepository.kt +++ b/src/main/kotlin/it/bot/repository/CommandCacheRepository.kt @@ -19,6 +19,6 @@ class CommandCacheRepository : PanacheRepository { fun deleteElapsedChatUserCommand(minutes: Int) { val currentTimeNow = Calendar.getInstance() currentTimeNow.add(Calendar.MINUTE, -minutes) - delete("creationDate <= ?1", minutes) + delete("creationDate <= ?1", currentTimeNow.time) } }