From 125ba6192ece8457fca72222973479f1495aac8f Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Mon, 11 Oct 2021 21:32:44 -0400 Subject: [PATCH] Elevate insertion logs to info and fix error logs --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2a3ce64..1be144d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -255,11 +255,11 @@ async fn put_add_favorite( HttpResponse::Ok() } Err(e) => { - info!("{:?} {}. for user: {}", e, body.path, user_id); + error!("{:?} {}. for user: {}", e, body.path, user_id); HttpResponse::BadRequest() } Ok(_) => { - debug!("Adding favorite \"{}\" for userid: {}", body.path, user_id); + info!("Adding favorite \"{}\" for userid: {}", body.path, user_id); HttpResponse::Created() } } @@ -284,7 +284,7 @@ async fn delete_favorite( .await .unwrap(); - debug!( + info!( "Removing favorite \"{}\" for userid: {}", body.path, user_id ); @@ -329,7 +329,7 @@ async fn add_tag(_: Claims, body: web::Json) -> impl Responder { Err(e) } Ok(id) => { - debug!("Inserted tag: '{}' with id: {:?}", tag, id); + info!("Inserted tag: '{}' with id: {:?}", tag, id); Ok(id) } } @@ -355,7 +355,7 @@ async fn add_tag(_: Claims, body: web::Json) -> impl Responder { }) .execute(connection) .map(|_| { - debug!("Inserted tagged photo: {} -> '{}'", tag_id, file_name); + info!("Inserted tagged photo: {} -> '{}'", tag_id, file_name); HttpResponse::Created() })