fixed warnings in palylist and sidebar

This commit is contained in:
Danny Zou 2024-04-13 16:22:52 -04:00
parent 2c1df1da3f
commit 1e59195aff
2 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,4 @@
use leptos::*; use leptos::*;
use crate::models::Playlist;
use cfg_if::cfg_if; use cfg_if::cfg_if;
@ -27,6 +26,7 @@ cfg_if! {
pub async fn create_playlist(playlist_name: String)->Result<(), ServerFnError> { pub async fn create_playlist(playlist_name: String)->Result<(), ServerFnError> {
use crate::schema::playlists::dsl::*; use crate::schema::playlists::dsl::*;
use leptos::server_fn::error::NoCustomError; use leptos::server_fn::error::NoCustomError;
use crate::models::Playlist;
let auth_session = extract::<AuthSession<AuthBackend>>().await let auth_session = extract::<AuthSession<AuthBackend>>().await
.map_err(|e| ServerFnError::<NoCustomError>::ServerError(format!("Error getting auth session: {}", e)))?; .map_err(|e| ServerFnError::<NoCustomError>::ServerError(format!("Error getting auth session: {}", e)))?;

View File

@ -1,4 +1,3 @@
use leptos::ev::play;
use leptos::leptos_dom::*; use leptos::leptos_dom::*;
use leptos::*; use leptos::*;
use leptos_icons::*; use leptos_icons::*;