Update song queue flow (#142)

* Added new status and made changes to song queue status code

* Saving changes

* Got a test working

* Got another test working

* Got the last test working

* Code cleanup

* More minor changes

* More minor changes

* Minor changes
This commit was merged in pull request #142.
This commit is contained in:
KD
2025-06-07 14:47:42 -04:00
committed by GitHub
parent eb1f19a96e
commit 6f2e8d6e17
3 changed files with 360 additions and 303 deletions
+3 -2
View File
@@ -148,11 +148,12 @@ pub mod response {
pub mod status {
pub const PENDING: &str = "pending";
pub const READY: &str = "ready";
pub const PROCESSING: &str = "processing";
pub const DONE: &str = "done";
pub async fn is_valid(status: &str) -> bool {
status == PENDING || status == PROCESSING || status == DONE
status == PENDING || status == PROCESSING || status == DONE || status == READY
}
}
@@ -396,7 +397,7 @@ mod song_queue {
"#,
)
.bind(super::status::PROCESSING)
.bind(super::status::PENDING)
.bind(super::status::READY)
.fetch_one(pool)
.await
.map_err(|e| {