Skip to content

Commit

Permalink
Update MailDependency type
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand authored Jun 12, 2024
1 parent 6024d16 commit 145a1d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from fastapi import Depends, FastAPI, HTTPException, Header

from src import crud, models, schemas, auth
from src.mail import mail_service, is_expired_invite
from src.mail import MailSender, mail_service, is_expired_invite
from src.database import SessionLocal, engine
from sqlalchemy.orm import Session

Expand Down Expand Up @@ -45,7 +45,7 @@ def ensure_user(db: DbDependency, x_user: Annotated[str, Header()]) -> models.Us
app = FastAPI(dependencies=[Depends(get_db)])

UserDependency = Annotated[models.User, Depends(ensure_user)]
MailDependency = Annotated[models.Invite, Depends(get_mail_sender)]
MailDependency = Annotated[MailSender, Depends(get_mail_sender)]

################################################
# USERS
Expand Down Expand Up @@ -509,4 +509,4 @@ def send_payment_reminder(db: DbDependency,
else:
raise HTTPException(
status_code=HTTPStatus.BAD_REQUEST, detail="No se pudo enviar recordatorio de pago al usuario."
)
)

0 comments on commit 145a1d8

Please sign in to comment.