Update project configuration and documentation for Reference Board Viewer. Add .direnv support for environment management, enhance README with quick start instructions, and update flake.nix with additional dependencies including pydantic-settings and bcrypt. Introduce quick-start.sh and test-auth.sh scripts for streamlined setup and authentication testing. Remove obsolete planning and task documents to clean up the repository.
This commit is contained in:
@@ -47,7 +47,7 @@ def register_user(user_data: UserCreate, db: Session = Depends(get_db)):
|
||||
# Create user
|
||||
user = repo.create_user(email=user_data.email, password=user_data.password)
|
||||
|
||||
return UserResponse.from_orm(user)
|
||||
return UserResponse.model_validate(user)
|
||||
|
||||
|
||||
@router.post("/login", response_model=TokenResponse)
|
||||
@@ -91,7 +91,7 @@ def login_user(login_data: UserLogin, db: Session = Depends(get_db)):
|
||||
return TokenResponse(
|
||||
access_token=access_token,
|
||||
token_type="bearer",
|
||||
user=UserResponse.from_orm(user)
|
||||
user=UserResponse.model_validate(user)
|
||||
)
|
||||
|
||||
|
||||
@@ -106,5 +106,5 @@ def get_current_user_info(current_user: User = Depends(get_current_user)):
|
||||
Returns:
|
||||
Current user information
|
||||
"""
|
||||
return UserResponse.from_orm(current_user)
|
||||
return UserResponse.model_validate(current_user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user