fix: login not using template repsonse
This commit is contained in:
parent
0e001be0ad
commit
6867f7b581
@ -1,6 +1,7 @@
|
||||
use actix_identity::Identity;
|
||||
use actix_web::{Responder, HttpResponse, http::header::LOCATION};
|
||||
use actix_web::{http::header::LOCATION, HttpResponse, Responder};
|
||||
use askama::Template;
|
||||
use askama_actix::TemplateToResponse;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "user/login.html")]
|
||||
@ -13,8 +14,8 @@ async fn get(user: Option<Identity>) -> impl Responder {
|
||||
.insert_header((LOCATION, "/"))
|
||||
.finish();
|
||||
} else {
|
||||
let bla = LoginTemplate {};
|
||||
let template = LoginTemplate {};
|
||||
|
||||
return HttpResponse::Ok().body(bla.render().unwrap());
|
||||
return template.to_response();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user