parent
74de914688
commit
09beb0bcc2
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ impl Library {
|
||||||
|
|
||||||
pub async fn get_video_by_id(&self, id: &str) -> Option<Video> {
|
pub async fn get_video_by_id(&self, id: &str) -> Option<Video> {
|
||||||
sqlx::query_as("SELECT * FROM videos WHERE id = $1")
|
sqlx::query_as("SELECT * FROM videos WHERE id = $1")
|
||||||
.bind(uuid::Uuid::from_str(id).unwrap())
|
.bind(uuid::Uuid::from_str(id).unwrap_or(uuid::Uuid::nil()))
|
||||||
.fetch_optional(&self.conn)
|
.fetch_optional(&self.conn)
|
||||||
.await
|
.await
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
Loading…
Add table
Reference in a new issue