Confirmation page and minor improvements to homepage and form messages
Basic redirect with flash messages for success and error messages
This commit is contained in:
@@ -72,7 +72,7 @@ impl IntoResponse for SubscribeError {
|
||||
}),
|
||||
)
|
||||
.into_response(),
|
||||
SubscribeError::ValidationError(_) => Redirect::to("/register").into_response(),
|
||||
SubscribeError::ValidationError(_) => Redirect::to("/").into_response(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ pub async fn subscribe(
|
||||
.await
|
||||
.context("Failed to commit the database transaction to store a new subscriber.")?;
|
||||
messages.success("A confirmation email has been sent.");
|
||||
Ok(Redirect::to("/register").into_response())
|
||||
Ok(Redirect::to("/").into_response())
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
|
||||
Reference in New Issue
Block a user