Removing hard coded user_id #38

Merged
phoenix merged 3 commits from queue_item_change into devel 2025-07-23 01:18:36 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 26147ed0b6 - Show all commits

View File

@@ -21,9 +21,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("Queue is not empty"); println!("Queue is not empty");
println!("SongQueueItem: {song_queue_item:?}"); println!("SongQueueItem: {song_queue_item:?}");
let song_queue_id = song_queue_item.data[0].id; let song_queue_id = song_queue_item.data[0].id;
let user_id = song_queue_item.data[0].user_id;
// TODO: Do something with the result later // TODO: Do something with the result later
match some_work(&app_base_url, &song_queue_id).await { match some_work(&app_base_url, &song_queue_id, &user_id).await {
Ok(( Ok((
_song, _song,
_coverart, _coverart,
@@ -125,6 +126,7 @@ async fn is_queue_empty(
async fn some_work( async fn some_work(
app_base_url: &String, app_base_url: &String,
song_queue_id: &uuid::Uuid, song_queue_id: &uuid::Uuid,
user_id: &uuid::Uuid,
) -> Result< ) -> Result<
( (
icarus_models::song::Song, icarus_models::song::Song,
@@ -155,7 +157,7 @@ async fn some_work(
// TODO: Do not hard code this. Check if one of the existing // TODO: Do not hard code this. Check if one of the existing
// endpoints already have the user_id // endpoints already have the user_id
let user_id = uuid::Uuid::new_v4(); // let user_id = uuid::Uuid::new_v4();
// TODO: Place this somewhere else // TODO: Place this somewhere else
let song_type = String::from("flac"); let song_type = String::from("flac");
// Err(std::io::Error::other(err.to_string())) // Err(std::io::Error::other(err.to_string()))

View File

@@ -6,6 +6,7 @@ pub mod fetch_next_queue_item {
pub id: uuid::Uuid, pub id: uuid::Uuid,
pub filename: String, pub filename: String,
pub status: String, pub status: String,
pub user_id: uuid::Uuid,
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]