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()
|
HttpResponse::Ok()
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
info!("{:?} {}. for user: {}", e, body.path, user_id);
|
error!("{:?} {}. for user: {}", e, body.path, user_id);
|
||||||
HttpResponse::BadRequest()
|
HttpResponse::BadRequest()
|
||||||
}
|
}
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
debug!("Adding favorite \"{}\" for userid: {}", body.path, user_id);
|
info!("Adding favorite \"{}\" for userid: {}", body.path, user_id);
|
||||||
HttpResponse::Created()
|
HttpResponse::Created()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -284,7 +284,7 @@ async fn delete_favorite(
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
debug!(
|
info!(
|
||||||
"Removing favorite \"{}\" for userid: {}",
|
"Removing favorite \"{}\" for userid: {}",
|
||||||
body.path, user_id
|
body.path, user_id
|
||||||
);
|
);
|
||||||
@@ -329,7 +329,7 @@ async fn add_tag(_: Claims, body: web::Json<AddTagRequest>) -> impl Responder {
|
|||||||
Err(e)
|
Err(e)
|
||||||
}
|
}
|
||||||
Ok(id) => {
|
Ok(id) => {
|
||||||
debug!("Inserted tag: '{}' with id: {:?}", tag, id);
|
info!("Inserted tag: '{}' with id: {:?}", tag, id);
|
||||||
Ok(id)
|
Ok(id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -355,7 +355,7 @@ async fn add_tag(_: Claims, body: web::Json<AddTagRequest>) -> impl Responder {
|
|||||||
})
|
})
|
||||||
.execute(connection)
|
.execute(connection)
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
debug!("Inserted tagged photo: {} -> '{}'", tag_id, file_name);
|
info!("Inserted tagged photo: {} -> '{}'", tag_id, file_name);
|
||||||
|
|
||||||
HttpResponse::Created()
|
HttpResponse::Created()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user