diff --git a/actix_mvc_app/src/controllers/auth.rs b/actix_mvc_app/src/controllers/auth.rs index 33e1fb0..4711133 100644 --- a/actix_mvc_app/src/controllers/auth.rs +++ b/actix_mvc_app/src/controllers/auth.rs @@ -25,7 +25,7 @@ impl AuthController { pub async fn login( form: web::Form, session: Session, - tmpl: web::Data + _tmpl: web::Data ) -> Result { // In a real application, you would validate the credentials against a database // For this example, we'll use a hardcoded user @@ -51,14 +51,6 @@ impl AuthController { Ok(HttpResponse::Found() .append_header(("Location", "/")) .finish()) - - let rendered = tmpl.render("auth/login.html", &ctx) - .map_err(|e| { - eprintln!("Template rendering error: {}", e); - actix_web::error::ErrorInternalServerError("Template rendering error") - })?; - - Ok(HttpResponse::Ok().content_type("text/html").body(rendered)) } /// Renders the registration page @@ -79,7 +71,7 @@ impl AuthController { pub async fn register( form: web::Form, session: Session, - tmpl: web::Data + _tmpl: web::Data ) -> Result { // Skip validation and always create an admin user let mut user = User::new( diff --git a/actix_mvc_app/src/controllers/ticket.rs b/actix_mvc_app/src/controllers/ticket.rs index abd3c6b..5b39092 100644 --- a/actix_mvc_app/src/controllers/ticket.rs +++ b/actix_mvc_app/src/controllers/ticket.rs @@ -203,7 +203,7 @@ impl TicketController { pub async fn create_ticket( session: Session, form: web::Form, - tmpl: web::Data + _tmpl: web::Data ) -> Result { // Get the current user from the session let user = match session.get::("user")? {