Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
- replaced urljoin with string concat
  • Loading branch information
romanchyla committed Dec 22, 2021
1 parent 2fecb49 commit 0b175ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adsws/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from sqlalchemy import func
from sqlalchemy.orm import load_only
from adsmutils import get_date
from urlparse import urljoin


class StatusView(Resource):
"""
Expand Down Expand Up @@ -116,7 +116,7 @@ def post(self, token):
send_email(
email_addr=token,
email_template=PasswordResetEmail,
base_url=urljoin(current_app.config['VERIFY_URL'], 'reset-password'),
base_url="{}/{}".format(current_app.config['VERIFY_URL'], 'reset-password'),
payload=token
)
return {"message": "success"}, 200
Expand Down Expand Up @@ -473,7 +473,7 @@ def post(self):
}, 403
send_email(
email_addr=email,
base_url=urljoin(current_app.config['VERIFY_URL'], 'change-email'),
base_url="{}/{}".format(current_app.config['VERIFY_URL'], 'change-email'),
email_template=VerificationEmail,
payload=[email, u.id]
)
Expand Down Expand Up @@ -627,7 +627,7 @@ def post(self):
' registered for {0}'.format(email)}, 409
send_email(
email_addr=email,
base_url=urljoin(current_app.config['VERIFY_URL'], 'register'),
base_url="{}/{}".format(current_app.config['VERIFY_URL'], 'register'),
email_template=WelcomeVerificationEmail,
payload=email
)
Expand Down

0 comments on commit 0b175ff

Please sign in to comment.