Primo commit

This commit is contained in:
2026-01-13 11:20:12 +01:00
parent ce9e2fdf2a
commit 17453f5d13
51 changed files with 3883 additions and 2508 deletions

View File

@@ -61,17 +61,16 @@ def authenticate_user(db: Session, email: str, password: str) -> User | None:
return user
def create_user(db: Session, email: str, password: str, name: str, manager_id: str = None, role: str = "employee") -> User:
def create_user(db: Session, email: str, password: str, name: str, role: str = "employee") -> User:
"""Create a new user"""
user = User(
id=str(uuid.uuid4()),
email=email,
password_hash=hash_password(password),
name=name,
manager_id=manager_id,
role=role,
created_at=datetime.utcnow().isoformat(),
updated_at=datetime.utcnow().isoformat()
created_at=datetime.utcnow(),
updated_at=datetime.utcnow()
)
db.add(user)
db.commit()