Saving changes
pr CI / Test Suite (pull_request) Successful in 2m24s

This commit is contained in:
2026-08-14 07:42:09 -04:00
parent 2b0f857e3f
commit 6508c36c4b
2 changed files with 33 additions and 16 deletions
+17 -3
View File
@@ -205,7 +205,8 @@ pub mod endpoint {
.await
{
Ok(id) => {
match repo::data::insert(
println!("Inserting queued data");
match repo::data::queue::coverart::insert(
&pool,
&file_path,
&lr.config.bucket,
@@ -215,6 +216,7 @@ pub mod endpoint {
.await
{
Ok(_id) => {
println!("Successfully did it");
response.message = String::from("Successful");
response.data.push(id);
(axum::http::StatusCode::OK, axum::Json(response))
@@ -363,9 +365,20 @@ pub mod endpoint {
)]
pub async fn fetch_coverart_with_data(
axum::Extension(pool): axum::Extension<sqlx::PgPool>,
axum::extract::Path(id): axum::extract::Path<uuid::Uuid>,
axum::extract::Path(coverart_queue_id): axum::extract::Path<uuid::Uuid>,
) -> (axum::http::StatusCode, axum::response::Response) {
match repo::data::queue::coverart::get_with_coverart_queue_id(&pool, &id).await {
match repo::coverart::get_coverart_queue_with_id(&pool, &coverart_queue_id).await {
Ok(c) => {
println!("C: {c:?}");
}
Err(err) => {
eprintln!("Error: {err:?}");
eprintln!("This is wrong");
}
}
match repo::data::queue::coverart::get_with_coverart_queue_id(&pool, &coverart_queue_id)
.await
{
Ok((_id, file_key, _bucket, _region, _)) => {
let lab_config = crate::util::maze::get_config();
let lr = labyrinth::Labyrinth { config: lab_config };
@@ -421,6 +434,7 @@ pub mod endpoint {
}
}
Err(err) => {
eprintln!("Record not found");
eprintln!("Error: {err:?}");
(
axum::http::StatusCode::INTERNAL_SERVER_ERROR,