Elevate insertion logs to info and fix error logs
All checks were successful
Core Repos/ImageApi/pipeline/pr-master This commit looks good

This commit is contained in:
Cameron Cordes
2021-10-11 21:32:44 -04:00
parent 2e5ac8861c
commit 14ab02a1ec

View File

@@ -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<AddTagRequest>) -> 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<AddTagRequest>) -> impl Responder {
})
.execute(connection)
.map(|_| {
debug!("Inserted tagged photo: {} -> '{}'", tag_id, file_name);
info!("Inserted tagged photo: {} -> '{}'", tag_id, file_name);
HttpResponse::Created()
})