Fix the things i broke using logger.info
This commit is contained in:
@@ -14,7 +14,7 @@ aa_router = APIRouter(prefix="/aa", tags=["AccessAuth"])
|
||||
|
||||
@aa_router.post("/", response_model=AccessAuthorizationResponse)
|
||||
def add_accessauth(*, db: Session = Depends(get_session), aa: AccessAuthorizationCreate, admin: bool = Depends(auth_is_admin)):
|
||||
logger.info("Creating accessauth with data: ", aa)
|
||||
logger.info(f"Creating accessauth with data: {aa}")
|
||||
timetables = [Timetable.model_validate(t) for t in aa.timetables]
|
||||
db_aa = AccessAuthorizationDB(
|
||||
name=aa.name,
|
||||
|
||||
@@ -12,7 +12,7 @@ user_router = APIRouter(tags=["Users"])
|
||||
|
||||
@user_router.post("/users/", response_model=UserResponse)
|
||||
def create_user(*, db: Session = Depends(get_session), user: UserCreate, admin: bool = Depends(auth_is_admin)):
|
||||
logger.info("creating user with data ", user)
|
||||
logger.info(f"creating user with data: {user}")
|
||||
hashed_password = {"passwordhash": get_password_hash(user.password)}
|
||||
db_user = UserDB.model_validate(user, update=hashed_password)
|
||||
return add_and_refresh(db, db_user)
|
||||
|
||||
Reference in New Issue
Block a user