from sqlalchemy.orm import Session
from app.models import models


def update_user(db: Session, user_data: dict):
    print(user_data)
    user = models.User(**user_data)
    db.merge(user)
    db.commit()
    db.refresh(user)
    return user