Code cleanup
This commit is contained in:
@@ -440,10 +440,6 @@ pub mod endpoint {
|
|||||||
data.len()
|
data.len()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Save the file to disk
|
|
||||||
// let mut file = std::fs::File::create(&file_name).unwrap();
|
|
||||||
// file.write_all(&data).unwrap();
|
|
||||||
|
|
||||||
let raw_data: Vec<u8> = data.to_vec();
|
let raw_data: Vec<u8> = data.to_vec();
|
||||||
match song_queue::update(&pool, &raw_data, &id).await {
|
match song_queue::update(&pool, &raw_data, &id).await {
|
||||||
Ok(queued_data) => {
|
Ok(queued_data) => {
|
||||||
|
|||||||
@@ -1122,8 +1122,6 @@ mod tests {
|
|||||||
"Queued data should not be empty"
|
"Queued data should not be empty"
|
||||||
);
|
);
|
||||||
|
|
||||||
// let new_file = String::from("tests/Machine_gun/new_file.flac");
|
|
||||||
|
|
||||||
let temp_file = tempfile::tempdir()
|
let temp_file = tempfile::tempdir()
|
||||||
.expect("Could not create test directory");
|
.expect("Could not create test directory");
|
||||||
let test_dir = String::from(temp_file.path().to_str().unwrap());
|
let test_dir = String::from(temp_file.path().to_str().unwrap());
|
||||||
@@ -1142,8 +1140,6 @@ mod tests {
|
|||||||
let raw_uri =
|
let raw_uri =
|
||||||
String::from(crate::callers::endpoints::QUEUESONGUPDATE);
|
String::from(crate::callers::endpoints::QUEUESONGUPDATE);
|
||||||
let end_index = raw_uri.len() - 5;
|
let end_index = raw_uri.len() - 5;
|
||||||
// let mut uri: String = (&raw_uri[..end_index]).to_string();
|
|
||||||
// uri += &id.to_string();
|
|
||||||
|
|
||||||
let uri = format!(
|
let uri = format!(
|
||||||
"{}/{}",
|
"{}/{}",
|
||||||
@@ -1151,7 +1147,6 @@ mod tests {
|
|||||||
id.to_string()
|
id.to_string()
|
||||||
);
|
);
|
||||||
|
|
||||||
// app.clone().oneshot(req).await
|
|
||||||
match app
|
match app
|
||||||
.clone()
|
.clone()
|
||||||
.oneshot(
|
.oneshot(
|
||||||
|
|||||||
Reference in New Issue
Block a user