refactor
This commit is contained in:
parent
08e24f63f4
commit
fdb45f953e
15 changed files with 59 additions and 661 deletions
|
@ -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;
|
||||
|
|
|
@ -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}))
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use super::api_error;
|
||||
use super::FallibleApiResponse;
|
||||
use mongodb::bson::doc;
|
||||
use rocket::get;
|
||||
use serde_json::json;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue