From 375fc45f310476a0a49fc48054f6563c8e02e2f6 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 20 Dec 2020 17:48:31 +0530 Subject: fix cookies/cors, more logging --- src/handlers/users.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/handlers/users.rs') diff --git a/src/handlers/users.rs b/src/handlers/users.rs index bff532c..73fca84 100644 --- a/src/handlers/users.rs +++ b/src/handlers/users.rs @@ -57,6 +57,10 @@ pub async fn login( login_details: web::Json, ) -> impl Responder { info!("Login hit"); + if let Some(uname) = cookie.identity() { + info!("Found existing cookie: {:?}", cookie.identity()); + return HttpResponse::Ok().finish(); + } let conn = pool.get().unwrap(); let entered_pass = &login_details.password; let selected_user = customer -- cgit v1.2.3