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; } }