@@ -25,6 +25,22 @@ pub async fn insert(
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn update_file_key(pool: &sqlx::PgPool, id: &uuid::Uuid, file_key: &str) -> Result<(), sqlx::Error> {
|
||||
match sqlx::query(
|
||||
r#"
|
||||
UPDATE "songQueueData" SET file_key = $1 WHERE id = $2;
|
||||
"#,
|
||||
)
|
||||
.bind(file_key)
|
||||
.bind(id)
|
||||
.execute(pool)
|
||||
.await
|
||||
{
|
||||
Ok(_row) => Ok(()),
|
||||
Err(_) => Err(sqlx::Error::RowNotFound),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn get(
|
||||
pool: &sqlx::PgPool,
|
||||
id: &uuid::Uuid,
|
||||
|
||||
Reference in New Issue
Block a user