Removed data from being fetched
This commit is contained in:
+4
-7
@@ -47,7 +47,7 @@ mod song_queue {
|
|||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
pub filename: String,
|
pub filename: String,
|
||||||
pub status: String,
|
pub status: String,
|
||||||
pub data: Vec<u8>,
|
// pub data: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn insert(
|
pub async fn insert(
|
||||||
@@ -94,7 +94,7 @@ mod song_queue {
|
|||||||
FOR UPDATE SKIP LOCKED
|
FOR UPDATE SKIP LOCKED
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
)
|
)
|
||||||
RETURNING *;
|
RETURNING id, filename, status;
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.bind(status::PROCESSING)
|
.bind(status::PROCESSING)
|
||||||
@@ -119,12 +119,8 @@ mod song_queue {
|
|||||||
.try_get("status")
|
.try_get("status")
|
||||||
.map_err(|_e| sqlx::Error::RowNotFound)
|
.map_err(|_e| sqlx::Error::RowNotFound)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
data: row
|
|
||||||
.try_get("data")
|
|
||||||
.map_err(|_e| sqlx::Error::RowNotFound)
|
|
||||||
.unwrap(),
|
|
||||||
}),
|
}),
|
||||||
Err(err) => Err(sqlx::Error::RowNotFound),
|
Err(_err) => Err(sqlx::Error::RowNotFound),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -192,6 +188,7 @@ pub mod endpoint {
|
|||||||
|
|
||||||
match song_queue::get_most_recent_and_update(&pool).await {
|
match song_queue::get_most_recent_and_update(&pool).await {
|
||||||
Ok(item) => {
|
Ok(item) => {
|
||||||
|
response.message = String::from("Successful");
|
||||||
response.data.push(item);
|
response.data.push(item);
|
||||||
(StatusCode::OK, Json(response))
|
(StatusCode::OK, Json(response))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user