From ffcffe940aeee5815cf1aa642ec22cb058036631 Mon Sep 17 00:00:00 2001 From: Dmitrii Prokudin Date: Fri, 27 Dec 2024 00:09:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=BE=D0=B3=D0=B8=D0=BA=D0=B0=20=D0=BE?= =?UTF-8?q?=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D1=8F=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F=20=D0=B4?= =?UTF-8?q?=D0=BD=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/UserOfTheDayRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Data/UserOfTheDayRepository.cs b/Data/UserOfTheDayRepository.cs index e1d7bb2..6bbb0f8 100644 --- a/Data/UserOfTheDayRepository.cs +++ b/Data/UserOfTheDayRepository.cs @@ -37,9 +37,9 @@ public interface IUserOfTheDayRepository using (IDbConnection db = new NpgsqlConnection(_connectionString)) { string query = "SELECT COUNT(1) FROM user_of_the_day WHERE chat_id = @ChatId AND date = @Date AND type = @Type"; - var res = await db.ExecuteScalarAsync(query, new { ChatId = chatId, Date = date, Type = type }); + var res = await db.ExecuteScalarAsync(query, new { ChatId = chatId, Date = date, Type = type }); Console.WriteLine($"{chatId} : {type} : {res}"); - return res; + return res > 0; } }