Recovered orphaned WIP before switching to a new task
This commit is contained in:
@@ -13,7 +13,7 @@ from app.models.user import User
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
# ── Pydantic schemas ──────────────────────────────────────────────────────────
|
||||
# ── Pydantic schemas ──────────────────────────────────────────────────────
|
||||
|
||||
class UserCreate(BaseModel):
|
||||
username: str
|
||||
@@ -35,7 +35,7 @@ class UserUpdate(BaseModel):
|
||||
is_active: bool | None = None
|
||||
|
||||
|
||||
# ── Endpoints ─────────────────────────────────────────────────────────────────
|
||||
# ── Endpoints ─────────────────────────────────────────────────────────────
|
||||
|
||||
@router.post(
|
||||
"/",
|
||||
@@ -57,9 +57,9 @@ async def create_user(
|
||||
if existing.scalar_one_or_none():
|
||||
raise HTTPException(status_code=400, detail="Email already registered")
|
||||
|
||||
from app.routers.auth import _get_password_hash
|
||||
from app.routers.auth import hash_password
|
||||
|
||||
hashed = _get_password_hash(user_in.password)
|
||||
hashed = hash_password(user_in.password)
|
||||
|
||||
user = User(
|
||||
username=user_in.username,
|
||||
|
||||
Reference in New Issue
Block a user