Autoformat

This commit is contained in:
Antoine Gersant 2017-09-26 23:00:28 -07:00
parent 54c5704133
commit 6ae9f6b6a0
2 changed files with 9 additions and 5 deletions

View file

@ -176,10 +176,10 @@ fn get_endpoints(db: Arc<DB>, index_channel: Arc<Mutex<Sender<index::Command>>>)
"read_playlist");
playlist_router.delete("/:playlist_name",
move |request: &mut Request| {
self::delete_playlist(request, delete_db.deref())
},
"delete_playlist");
move |request: &mut Request| {
self::delete_playlist(request, delete_db.deref())
},
"delete_playlist");
auth_api_mount.mount("/playlist/", playlist_router);
}

View file

@ -74,7 +74,11 @@ pub fn list_playlists<T>(owner: &str, db: &T) -> Result<Vec<String>>
}
}
pub fn save_playlist<T>(playlist_name: &str, owner: &str, content: &Vec<String>, db: &T) -> Result<()>
pub fn save_playlist<T>(playlist_name: &str,
owner: &str,
content: &Vec<String>,
db: &T)
-> Result<()>
where T: ConnectionSource + VFSSource
{
let user: User;