Authentication and form for newsletter publishing
This commit is contained in:
11
src/routes/admin/dashboard.rs
Normal file
11
src/routes/admin/dashboard.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use crate::authentication::AuthenticatedUser;
|
||||
use axum::{
|
||||
Extension,
|
||||
response::{Html, IntoResponse, Response},
|
||||
};
|
||||
|
||||
pub async fn admin_dashboard(
|
||||
Extension(AuthenticatedUser { username, .. }): Extension<AuthenticatedUser>,
|
||||
) -> Response {
|
||||
Html(format!(include_str!("html/dashboard.html"), username)).into_response()
|
||||
}
|
||||
Reference in New Issue
Block a user