This commit is contained in:
JMARyA 2024-10-04 14:46:06 +02:00
parent 08e24f63f4
commit fdb45f953e
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
15 changed files with 59 additions and 661 deletions

View file

@ -4,7 +4,6 @@ use super::vec_to_api;
use super::FallibleApiResponse;
use super::ToAPI;
use fs::NamedFile;
use mongodb::bson::doc;
use rocket::{fs, get, State};
use crate::cache::RouteCache;

View file

@ -1,7 +1,6 @@
use crate::get_pg;
use crate::library::track::Track;
use crate::library::user::User;
use mongodb::bson::doc;
use rocket::get;
use rocket::post;
use rocket::serde::json::Json;
@ -172,7 +171,9 @@ pub async fn playlist_edit_route(
.bind(new_vis)
.bind(tracks_ref)
.bind(&to_uuid(&playlist_id)?)
.fetch(get_pg!());
.fetch_one(get_pg!())
.await
.unwrap();
Ok(json!({"edited": playlist_id}))
}

View file

@ -1,6 +1,5 @@
use super::api_error;
use super::FallibleApiResponse;
use mongodb::bson::doc;
use rocket::get;
use serde_json::json;

View file

@ -1,7 +1,6 @@
use std::str::FromStr;
use super::api_error;
use super::no_uuid_error;
use super::to_uuid;
use super::FallibleApiResponse;
use super::ToAPI;

View file

@ -1,5 +1,4 @@
use crate::get_pg;
use crate::library::user::Session;
use crate::library::user::User;
use crate::route::vec_to_api;
use rocket::get;