From 5e935495915412d2cc565d3587d242bd54e9bd5e Mon Sep 17 00:00:00 2001 From: maike Date: Mon, 6 Jul 2020 17:00:24 +0200 Subject: [PATCH] [email] Generate URL directly --- kibicara/platforms/email/webapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kibicara/platforms/email/webapi.py b/kibicara/platforms/email/webapi.py index 05a326b..5942400 100644 --- a/kibicara/platforms/email/webapi.py +++ b/kibicara/platforms/email/webapi.py @@ -6,8 +6,8 @@ from fastapi import APIRouter, Depends, HTTPException, status from kibicara.platforms.email.bot import spawner from kibicara.platforms.email.model import Email, EmailRecipients from kibicara.platformapi import Message +from kibicara.config import config from kibicara.webapi.hoods import get_hood -from kibicara.webapi.admin import url from kibicara.email import send_email from ormantic.exceptions import NoMatch from pydantic import BaseModel @@ -63,7 +63,7 @@ async def email_recipient_create(recipient: Recipient): 'email': recipient.email, 'hood': recipient.hood, }, Email.secret).decode('ascii') - confirm_link = url("/api/email/recipient/confirm/" + token) + confirm_link = config['root_url'] + "api/email/recipient/confirm/" + token hood_name = await get_hood(recipient.hood) send_email(recipient.email, "Subscribe to Kibicara " + hood_name,