Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt fix of registration #190

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/utils/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ async def send_verification_email_with_sendgrid(email: List[str], token: str):
html_content=f'Click on the link to verify your email: <a href="https://{APP_HOST}/verify-email?token={token}">https://{APP_HOST}/verify-email</a>',
)
# Disable click tracking in development
if APP_ENV == "dev":
message.tracking_settings = TrackingSettings()
message.tracking_settings.click_tracking = ClickTracking(False, False)
# if APP_ENV == "dev":
message.tracking_settings = TrackingSettings()
message.tracking_settings.click_tracking = ClickTracking(False, False)
try:
sg = SendGridAPIClient(SENDGRID_API_KEY)
response = await sg.send(message)
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/register/RegisterPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { API_URL } from '../../utils/constants';
function RegisterPage() {
const [errorMessage, setErrorMessage] = useState('');
const navigate = useNavigate();
const { updateAuth } = useAuth();

const handleSubmit = async (username, email, password, subscribe, marketingContent) => {
try {
Expand All @@ -22,6 +23,7 @@ function RegisterPage() {
});

if (response.data.message === 'Registration successful') {
updateAuth(true);
// Call the send-verification-email endpoint
await axios.post(`${API_URL}users/send-verification-email/`, {
email,
Expand Down
Loading