still trying to figure out video db stuff
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Chris Cochrun 2025-09-25 11:11:31 -05:00
parent a019dc235d
commit 5cb53cbe72
5 changed files with 63 additions and 95 deletions

View file

@ -245,7 +245,7 @@ pub async fn update_video_in_db(
.to_str()
.map(std::string::ToString::to_string)
.unwrap_or_default();
query!(
let result = query!(
r#"UPDATE videos SET title = $2, file_path = $3, start_time = $4, end_time = $5, loop = $6 WHERE id = $1"#,
video.id,
video.title,
@ -255,10 +255,15 @@ pub async fn update_video_in_db(
video.looping,
)
.execute(&mut db.detach())
.await
.into_diagnostic()?;
.await.into_diagnostic();
Ok(())
match result {
Ok(_) => Ok(()),
Err(e) => {
error! {?e};
Err(e)
}
}
}
pub async fn get_video_from_db(