diff options
author | clarkzjw <[email protected]> | 2023-02-23 21:18:49 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-23 21:19:21 -0800 |
commit | cbfde03e620188d80213a8b15a4dffdb8948b257 (patch) | |
tree | 8f92afbed1137c6f992be57a84a3101a09475acc /dbstore/peewee_store.py | |
parent | d7c1835ed41d50d8e0fd42fd8c33fa760ce24bb5 (diff) | |
download | swarm2fediverse-cbfde03e620188d80213a8b15a4dffdb8948b257.tar.gz |
bot: implement /logout command
Diffstat (limited to 'dbstore/peewee_store.py')
-rw-r--r-- | dbstore/peewee_store.py | 5 |
1 files changed, 5 insertions, 0 deletions
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: | |||
51 | return "" | 51 | return "" |
52 | 52 | ||
53 | 53 | ||
54 | def delete_user_by_id(telegram_user_id: str) -> int: | ||
55 | with db.connection_context(): | ||
56 | return User.delete().where(User.telegram_user_id == telegram_user_id).execute() | ||
57 | |||
58 | |||
54 | def get_user_home_instance(telegram_user_id: str) -> dict: | 59 | def get_user_home_instance(telegram_user_id: str) -> dict: |
55 | with db.connection_context(): | 60 | with db.connection_context(): |
56 | try: | 61 | try: |