diff --git a/services/repository.py b/services/repository.py index cde7404..b98be59 100644 --- a/services/repository.py +++ b/services/repository.py @@ -13,3 +13,8 @@ class Repo: "VALUES ($1, $2) ON CONFLICT (user_id) DO NOTHING", user_id, chat_id ) + + async def get_user(self, user_id: int): + return await self.conn.fetchval( + "SELECT user_id FROM users WHERE user_id = $1", user_id + )