mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 03:09:01 +08:00
fix: correct invite url (#1173)
This commit is contained in:
parent
5d9070bc60
commit
fc68c81791
@ -408,7 +408,6 @@ class RegisterService:
|
|||||||
to=email,
|
to=email,
|
||||||
token=token,
|
token=token,
|
||||||
inviter_name=inviter.name if inviter else 'Dify',
|
inviter_name=inviter.name if inviter else 'Dify',
|
||||||
workspace_id=tenant.id,
|
|
||||||
workspace_name=tenant.name,
|
workspace_name=tenant.name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,16 +9,15 @@ from extensions.ext_mail import mail
|
|||||||
|
|
||||||
|
|
||||||
@shared_task(queue='mail')
|
@shared_task(queue='mail')
|
||||||
def send_invite_member_mail_task(to: str, token: str, inviter_name: str, workspace_id: str, workspace_name: str):
|
def send_invite_member_mail_task(to: str, token: str, inviter_name: str, workspace_name: str):
|
||||||
"""
|
"""
|
||||||
Async Send invite member mail
|
Async Send invite member mail
|
||||||
:param to
|
:param to
|
||||||
:param token
|
:param token
|
||||||
:param inviter_name
|
:param inviter_name
|
||||||
:param workspace_id
|
|
||||||
:param workspace_name
|
:param workspace_name
|
||||||
|
|
||||||
Usage: send_invite_member_mail_task.delay(to, token, inviter_name, workspace_id, workspace_name)
|
Usage: send_invite_member_mail_task.delay(to, token, inviter_name, workspace_name)
|
||||||
"""
|
"""
|
||||||
if not mail.is_inited():
|
if not mail.is_inited():
|
||||||
return
|
return
|
||||||
@ -36,12 +35,7 @@ def send_invite_member_mail_task(to: str, token: str, inviter_name: str, workspa
|
|||||||
<p>Click <a href="{url}">here</a> to join.</p>
|
<p>Click <a href="{url}">here</a> to join.</p>
|
||||||
<p>Thanks,</p>
|
<p>Thanks,</p>
|
||||||
<p>Dify Team</p>""".format(inviter_name=inviter_name, workspace_name=workspace_name,
|
<p>Dify Team</p>""".format(inviter_name=inviter_name, workspace_name=workspace_name,
|
||||||
url='{}/activate?workspace_id={}&email={}&token={}'.format(
|
url=f'{current_app.config.get("CONSOLE_WEB_URL")}/activate?token={token}')
|
||||||
current_app.config.get("CONSOLE_WEB_URL"),
|
|
||||||
workspace_id,
|
|
||||||
to,
|
|
||||||
token)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
end_at = time.perf_counter()
|
end_at = time.perf_counter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user