feat(auth,privacy,web): step-by-step login, privacy settings persistence, TOTP QR, and API docs
Some checks failed
CI / test (push) Failing after 22s
Some checks failed
CI / test (push) Failing after 22s
This commit is contained in:
@@ -5,6 +5,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.auth.schemas import (
|
||||
AuthUserResponse,
|
||||
EmailStatusResponse,
|
||||
LoginRequest,
|
||||
MessageResponse,
|
||||
RefreshTokenRequest,
|
||||
@@ -30,6 +31,7 @@ from app.auth.service import (
|
||||
revoke_user_session,
|
||||
refresh_tokens,
|
||||
register_user,
|
||||
get_email_status,
|
||||
request_password_reset,
|
||||
resend_verification_email,
|
||||
reset_password,
|
||||
@@ -45,6 +47,14 @@ from app.users.models import User
|
||||
router = APIRouter(prefix="/auth", tags=["auth"])
|
||||
|
||||
|
||||
@router.get("/check-email", response_model=EmailStatusResponse)
|
||||
async def check_email_status(
|
||||
email: str,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
) -> EmailStatusResponse:
|
||||
return await get_email_status(db, email=email)
|
||||
|
||||
|
||||
@router.post("/register", response_model=MessageResponse, status_code=status.HTTP_201_CREATED)
|
||||
async def register(
|
||||
payload: RegisterRequest,
|
||||
|
||||
Reference in New Issue
Block a user