Code cleanup

This commit is contained in:
kdeng00
2025-10-20 00:15:28 -04:00
parent 536eed4ca2
commit d00a3e7bb8
2 changed files with 0 additions and 48 deletions
-16
View File
@@ -81,11 +81,6 @@ pub mod request {
duration: self.duration, duration: self.duration,
audio_type: self.audio_type.clone(), audio_type: self.audio_type.clone(),
user_id: self.user_id, user_id: self.user_id,
// TODO: Change the type of this in icarus_models lib
// date_created: self.date_created,
// filename: String::new(),
// data: Vec::new(),
// directory: String::new(),
..Default::default() ..Default::default()
} }
} }
@@ -1559,17 +1554,6 @@ pub mod endpoint {
) )
} }
} }
// }
/*
Err(err) => {
response.message = err.to_string();
(
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
)
}
*/
// }
} else { } else {
response.message = response.message =
String::from("Could not locate coverart on the filesystem"); String::from("Could not locate coverart on the filesystem");
-32
View File
@@ -2414,8 +2414,6 @@ mod tests {
..Default::default() ..Default::default()
}; };
// use std::io::Write;
match song.save_to_filesystem() { match song.save_to_filesystem() {
Ok(_) => match coverart.save_to_filesystem() { Ok(_) => match coverart.save_to_filesystem() {
Ok(_) => Ok(()), Ok(_) => Ok(()),
@@ -2423,36 +2421,6 @@ mod tests {
}, },
Err(err) => Err(err), Err(err) => Err(err),
} }
/*
match song.song_path() {
Ok(song_path) => {
let song_p = std::path::Path::new(&song_path);
match std::fs::File::create(song_p) {
Ok(mut song_file) => match song_file.write_all(&song_data) {
Ok(_) => {}
Err(err) => {
return Err(err);
}
},
Err(err) => {
return Err(err);
}
}
}
Err(err) => {
return Err(err);
}
}
let coverart_p = std::path::Path::new(&coverart.path);
match std::fs::File::create(coverart_p) {
Ok(mut coverart_file) => match coverart_file.write_all(&coverart_data) {
Ok(_) => Ok(()),
Err(err) => Err(err),
},
Err(err) => Err(err),
}
*/
} }
#[tokio::test] #[tokio::test]