diff --git a/endpoints/api/v1/endpoint.post.py b/endpoints/api/v1/endpoint.post.py index 2acac52..34664ea 100644 --- a/endpoints/api/v1/endpoint.post.py +++ b/endpoints/api/v1/endpoint.post.py @@ -9,9 +9,9 @@ class UserRegistration(BaseModel): username: str email: EmailStr password: str - full_name: str | None = None + full_name: str -@router.post("/register") +@router.post("/api/v1/endpoint") async def register_user(user_data: UserRegistration): """Register a new user""" if user_data.username in fake_users_db: @@ -21,23 +21,22 @@ async def register_user(user_data: UserRegistration): fake_users_db[user_data.username] = { "id": user_id, "email": user_data.email, - "password": user_data.password, # In production, hash this password + "password": user_data.password, "full_name": user_data.full_name, - "disabled": False, - "created_at": str(datetime.now()) + "disabled": False } return { "message": "User registered successfully", "user_id": user_id, "username": user_data.username, + "metadata": { + "account_status": "active", + "registration_complete": True + }, "next_steps": [ "Verify your email address", "Complete your profile", "Set up two-factor authentication" - ], - "metadata": { - "account_status": "pending_verification", - "registration_date": str(datetime.now()) - } + ] } \ No newline at end of file