This commit is contained in:
JMARyA 2024-10-04 20:17:09 +02:00
parent ca45a6df02
commit e5a2dfaade
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 9 additions and 5 deletions

View file

@ -42,7 +42,8 @@ pub async fn recently_added_playlist() -> FallibleApiResponse {
pub async fn playlist_route(id: &str, u: User) -> FallibleApiResponse {
if id == "recents" {
return Ok(Playlist {
id: "recents".to_string(),
id: uuid::Uuid::nil(),
id_str: Some("recents".to_string()),
owner: u.username,
title: "Recently Played".to_string(),
visibility: Visibility::Public,
@ -54,7 +55,8 @@ pub async fn playlist_route(id: &str, u: User) -> FallibleApiResponse {
if id == "recentlyAdded" {
return Ok(Playlist {
id: "recentlyAdded".to_string(),
id: uuid::Uuid::nil(),
id_str: Some("recentlyAdded".to_string()),
owner: u.username,
title: "Recently Added".to_string(),
visibility: Visibility::Public,
@ -170,7 +172,7 @@ pub async fn playlist_edit_route(
.bind(new_title)
.bind(new_vis)
.bind(tracks_ref)
.bind(&to_uuid(&playlist_id)?)
.bind(&playlist_id)
.fetch_one(get_pg!())
.await
.unwrap();