Minor changes and added descriptions to all funcitons

This commit is contained in:
Lucas Mathews
2024-05-28 11:03:44 +02:00
parent 0732b26af3
commit 7b6ebbd0d2
12 changed files with 132 additions and 87 deletions

View File

@@ -15,13 +15,18 @@ frame = None
### Functions ###
#################
def go_to_login():
"""Closes the current window and opens the login page."""
root.destroy()
login_page() # Replace with your function or class that opens the login page
def logout():
"""Logs out the client and closes the application."""
"""Logs out the client and redirects to the login page."""
response = logout_client()
json_response = response.json()
if json_response['success']:
messagebox.showinfo("Logout", "You have been logged out.")
root.destroy()
go_to_login()
else:
messagebox.showerror("Logout failed", json_response['message'])