Song queue #258
@@ -160,6 +160,7 @@ pub mod endpoint {
|
|||||||
match super::is_song_valid(&raw_data).await {
|
match super::is_song_valid(&raw_data).await {
|
||||||
Ok(valid) => {
|
Ok(valid) => {
|
||||||
if valid {
|
if valid {
|
||||||
|
println!("Go");
|
||||||
match repo::song::insert(
|
match repo::song::insert(
|
||||||
&pool,
|
&pool,
|
||||||
&file_name,
|
&file_name,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ pub async fn insert(
|
|||||||
) -> Result<uuid::Uuid, sqlx::Error> {
|
) -> Result<uuid::Uuid, sqlx::Error> {
|
||||||
let result = sqlx::query(
|
let result = sqlx::query(
|
||||||
r#"
|
r#"
|
||||||
INSERT INTO "songQueue" (filename, status) VALUES($1, $2, $3) RETURNING id;
|
INSERT INTO "songQueue" (filename, status) VALUES($1, $2) RETURNING id;
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.bind(filename)
|
.bind(filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user