This commit is contained in:
famfo 2022-05-23 16:51:07 +02:00
parent f26215248e
commit 681b9cf85d
3 changed files with 5 additions and 4 deletions

View file

@ -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
} }
} }

View file

@ -69,4 +69,3 @@ pub struct Login {
pub struct Register { pub struct Register {
pub logged_in: Option<String>, pub logged_in: Option<String>,
} }

View file

@ -173,4 +173,3 @@ async fn logout(db: web::Data<Arc<Database>>) -> impl Responder {
.insert_header(("Location", "/")) .insert_header(("Location", "/"))
.finish() .finish()
} }