Skip to content

Commit

Permalink
fix: Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Mar 3, 2023
1 parent a9b38ab commit 339cfcd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/routes/login_with_email_token.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Union

from fastapi import APIRouter, Body, Depends, HTTPException, Response
from sqlalchemy.orm import Session

Expand Down Expand Up @@ -84,12 +86,8 @@ async def create_login_with_email_token(

@router.post(
"/verify",
response_model=UserDetail,
response_model=Union[UserDetail, LoginWithEmailOTPRequiredResponseModel],
responses={
200: {
"model": UserDetail,
"description": "User was successfully logged in (No OTP active).",
},
202: {
"model": LoginWithEmailOTPRequiredResponseModel,
"description": "User was successfully logged in, but OTP is required.",
Expand Down

0 comments on commit 339cfcd

Please sign in to comment.