Skip to content

Commit

Permalink
ℹ️ fix: adjust indentation in is_command function
Browse files Browse the repository at this point in the history
🔒 feat: add logout function for user logout functionality
  • Loading branch information
sudoskys committed May 31, 2024
1 parent e8353cd commit d7966ea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/sender/util_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,18 @@ async def login(uid: str, arg_string) -> str:
return error


async def logout(uid: str) -> str:
"""
Logout
:param uid: uid_make
:return: str message
"""
user = await USER_MANAGER.read(user_id=uid)
user.credential = None
await USER_MANAGER.save(user_model=user)
return telegramify_markdown.convert("Logout success! Welcome back master!")


class TimerObjectContainer:
def __init__(self):
self.users = {}
Expand Down

0 comments on commit d7966ea

Please sign in to comment.