From cbfde03e620188d80213a8b15a4dffdb8948b257 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Thu, 23 Feb 2023 21:18:49 -0800 Subject: bot: implement /logout command --- dbstore/peewee_store.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dbstore') diff --git a/dbstore/peewee_store.py b/dbstore/peewee_store.py index 2f637bf..f10627b 100644 --- a/dbstore/peewee_store.py +++ b/dbstore/peewee_store.py @@ -51,6 +51,11 @@ def get_user_access_key(telegram_user_id: str) -> str: return "" +def delete_user_by_id(telegram_user_id: str) -> int: + with db.connection_context(): + return User.delete().where(User.telegram_user_id == telegram_user_id).execute() + + def get_user_home_instance(telegram_user_id: str) -> dict: with db.connection_context(): try: -- cgit v1.2.3