Adding code to save info to get data from bucket
pr CI / Test Suite (pull_request) Successful in 4m12s

This commit is contained in:
2026-08-13 10:09:30 -04:00
parent 4f7bcc376f
commit 5f98b6b9db
3 changed files with 91 additions and 19 deletions
+12 -19
View File
@@ -213,28 +213,21 @@ pub mod endpoint {
Ok(res) => {
println!("Result: {res:?}");
println!("Downloading file");
match lr.download(&file_path).await {
Ok(res) => {
if res.is_empty() {
println!("This should not be empty");
} else {
println!("Size: {:?}", res.len());
println!("Going to delete file");
println!("Saving to db");
match lr.delete(&file_path).await {
Ok(res) => {
println!("Result: {res:?}");
println!("Deleted");
}
Err(err) => {
eprintln!("Error: {err:?}");
}
}
}
}
match repo::data::insert(
&pool,
&file_path,
&lr.config.bucket,
&lr.config.region,
&queued_song,
)
.await
{
Ok(_id) => {}
Err(err) => {
eprintln!("Error: {err:?}");
return (axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::Json(response));
}
}
}