Skip to content

Commit

Permalink
Confirmation webapp domain change
Browse files Browse the repository at this point in the history
  • Loading branch information
f213 committed Jan 14, 2024
1 parent 571e6d5 commit ae0a3db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/templates/email/confirmation.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Hey!

To confirm your email with selfmailbot, please click the following link: https://selfmailbot.co/confirm/{{ user.confirmation }}/ or just copy following confirmation key and send it to selfmailbot in telegram chat:
To confirm your email with selfmailbot, please click the following link: https://confirm.selfmailbot.co/{{ user.confirmation }}/ or just copy following confirmation key and send it to selfmailbot in telegram chat:

{{ user.confirmation }}

Expand Down
4 changes: 2 additions & 2 deletions src/templates/html/confirmation_failure.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1 class="title">
Something went wrong :'(
</h1>

<p class="subtitle">
The good idea is to return to <a href="tg://resolve?domain=selfmailbot">selfmailbot</a> and try again. Feel free to contact us at <a href="mailto:[email protected]">[email protected]</a> for any questions.
<p>
The good idea is to return to <a href="tg://resolve?domain=selfmailbot">selfmailbot</a> and try again.
</p>
{% endblock %}
16 changes: 8 additions & 8 deletions src/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
init_sentry()


@app.route("/confirm/<key>/")
@app.route("/healthcheck/")
def healthcheck() -> str:
with kombu.Connection(os.getenv("CELERY_BROKER_URL")) as connection:
connection.connect()
return render_template("ok.html")


@app.route("/<uuid:key>/")
def confirm(key: str) -> str:
user = get_user_by_confirmation_link(key)

Expand All @@ -25,10 +32,3 @@ def confirm(key: str) -> str:
user.save()

return render_template("confirmation_ok.html")


@app.route("/healthcheck/")
def healthcheck() -> str:
with kombu.Connection(os.getenv("CELERY_BROKER_URL")) as connection:
connection.connect()
return render_template("ok.html")

0 comments on commit ae0a3db

Please sign in to comment.