Elevate insertion logs to info and fix error logs
This commit is contained in:
10
src/main.rs
10
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<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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user