working on member menu manage

This commit is contained in:
2022-10-04 19:38:42 +02:00
parent d6467b2a8f
commit 688867250b
10 changed files with 146 additions and 34 deletions

9
services/auth.py Normal file
View File

@@ -0,0 +1,9 @@
from models.database import Database
from models.user import User
class Auth:
def check_auth(username, password):
user = User(Database.connection, None, username)
if user.load_by_username() and user.password == password:
return user
return None

5
services/state.py Normal file
View File

@@ -0,0 +1,5 @@
from ast import Import
from models.user import User
class State:
CURRENT_USER: User = None