aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-02-23 21:18:49 -0800
committerclarkzjw <[email protected]>2023-02-23 21:19:21 -0800
commitcbfde03e620188d80213a8b15a4dffdb8948b257 (patch)
tree8f92afbed1137c6f992be57a84a3101a09475acc /dbstore
parentd7c1835ed41d50d8e0fd42fd8c33fa760ce24bb5 (diff)
downloadswarm2fediverse-cbfde03e620188d80213a8b15a4dffdb8948b257.tar.gz
bot: implement /logout command
Diffstat (limited to 'dbstore')
-rw-r--r--dbstore/peewee_store.py5
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
54def 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
54def get_user_home_instance(telegram_user_id: str) -> dict: 59def get_user_home_instance(telegram_user_id: str) -> dict:
55 with db.connection_context(): 60 with db.connection_context():
56 try: 61 try:
Powered by cgit v1.2.3 (git 2.41.0)