Code formatting
This commit is contained in:
17
src/main.rs
17
src/main.rs
@@ -1,6 +1,5 @@
|
||||
pub mod api;
|
||||
pub mod config;
|
||||
pub mod the_rest;
|
||||
pub mod util;
|
||||
|
||||
pub const SECONDS_TO_SLEEP: u64 = 5;
|
||||
@@ -171,15 +170,15 @@ async fn wipe_data_from_queues(
|
||||
song_queue_id: &uuid::Uuid,
|
||||
coverart_queue_id: &uuid::Uuid,
|
||||
) -> Result<(), std::io::Error> {
|
||||
match the_rest::wipe_data::song_queue::wipe_data(app, song_queue_id).await {
|
||||
match api::wipe_data::song_queue::wipe_data(app, song_queue_id).await {
|
||||
Ok(response) => match response
|
||||
.json::<the_rest::wipe_data::song_queue::response::Response>()
|
||||
.json::<api::wipe_data::song_queue::response::Response>()
|
||||
.await
|
||||
{
|
||||
Ok(_resp) => {
|
||||
match the_rest::wipe_data::coverart_queue::wipe_data(app, coverart_queue_id).await {
|
||||
match api::wipe_data::coverart_queue::wipe_data(app, coverart_queue_id).await {
|
||||
Ok(inner_response) => match inner_response
|
||||
.json::<the_rest::wipe_data::coverart_queue::response::Response>()
|
||||
.json::<api::wipe_data::coverart_queue::response::Response>()
|
||||
.await
|
||||
{
|
||||
Ok(_inner_resp) => {
|
||||
@@ -278,13 +277,13 @@ async fn some_work(
|
||||
// TODO: Place this somewhere else
|
||||
let song_type = String::from("flac");
|
||||
|
||||
match the_rest::create_song::create(
|
||||
match api::create_song::create(
|
||||
app, &metadata, user_id, &song_type,
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(response) => match response
|
||||
.json::<the_rest::create_song::response::Response>()
|
||||
.json::<api::create_song::response::Response>()
|
||||
.await
|
||||
{
|
||||
Ok(resp) => {
|
||||
@@ -294,8 +293,8 @@ async fn some_work(
|
||||
song.directory = song_directory;
|
||||
song.filename = song_filename;
|
||||
|
||||
match the_rest::create_coverart::create(app, &song.id, &coverart_queue_id).await {
|
||||
Ok(response) => match response.json::<the_rest::create_coverart::response::Response>().await {
|
||||
match api::create_coverart::create(app, &song.id, &coverart_queue_id).await {
|
||||
Ok(response) => match response.json::<api::create_coverart::response::Response>().await {
|
||||
Ok(resp) => {
|
||||
println!("CoverArt sent and successfully parsed response");
|
||||
println!("json: {resp:?}");
|
||||
|
Reference in New Issue
Block a user