Изменил корс
This commit is contained in:
parent
7c9425df3d
commit
657ed38cda
2 changed files with 6 additions and 2 deletions
|
@ -21,7 +21,7 @@ app.include_router(user_router)
|
|||
app.include_router(pages_router)
|
||||
app.include_router(image_router)
|
||||
|
||||
origins = ["http://localhost:5173"]
|
||||
origins = ["*"]
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
|
|
|
@ -25,6 +25,10 @@ def generate_confirmation_code(length=6):
|
|||
@celery.task
|
||||
def send_registration_confirmation_email(user_id: int, username: str, email_to: EmailStr, MODE: str):
|
||||
confirmation_code = generate_confirmation_code()
|
||||
user_id=4
|
||||
username="lox"
|
||||
email_to="yur.afonin2017@yandex.ru"
|
||||
MODE="DEV"
|
||||
|
||||
if MODE == "TEST":
|
||||
return confirmation_code
|
||||
|
@ -43,7 +47,7 @@ def send_registration_confirmation_email(user_id: int, username: str, email_to:
|
|||
with smtplib.SMTP_SSL(settings.SMTP_HOST, settings.SMTP_PORT) as server:
|
||||
server.login(settings.SMTP_USER, settings.SMTP_PASS)
|
||||
server.send_message(msg_content)
|
||||
|
||||
print(confirmation_code)
|
||||
return confirmation_code
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue