Add get_user method
This commit is contained in:
parent
4730fb646b
commit
474efbf43f
|
@ -13,3 +13,8 @@ class Repo:
|
||||||
"VALUES ($1, $2) ON CONFLICT (user_id) DO NOTHING",
|
"VALUES ($1, $2) ON CONFLICT (user_id) DO NOTHING",
|
||||||
user_id, chat_id
|
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
|
||||||
|
)
|
||||||
|
|
Reference in a new issue