Rustfmt
This commit is contained in:
parent
f26215248e
commit
681b9cf85d
|
@ -66,7 +66,10 @@ impl Database {
|
||||||
}];
|
}];
|
||||||
let logged_in = self.logged_in().await;
|
let logged_in = self.logged_in().await;
|
||||||
|
|
||||||
templates::Tasks { tasks: vec, logged_in }
|
templates::Tasks {
|
||||||
|
tasks: vec,
|
||||||
|
logged_in,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn create_task(&self, task: &task::CreateTask) {
|
pub async fn create_task(&self, task: &task::CreateTask) {
|
||||||
|
@ -112,7 +115,7 @@ impl Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn logged_in(&self) -> Option<String> {
|
pub async fn logged_in(&self) -> Option<String> {
|
||||||
// TODO: find out if the user is logged in and return the username if yes
|
// TODO: find out if the user is logged in and return the username if yes
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,4 +69,3 @@ pub struct Login {
|
||||||
pub struct Register {
|
pub struct Register {
|
||||||
pub logged_in: Option<String>,
|
pub logged_in: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,4 +173,3 @@ async fn logout(db: web::Data<Arc<Database>>) -> impl Responder {
|
||||||
.insert_header(("Location", "/"))
|
.insert_header(("Location", "/"))
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue