Make axum-login crate optional
This commit is contained in:
@ -1,15 +1,7 @@
|
||||
use cfg_if::cfg_if;
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(feature = "ssr")] {
|
||||
use async_trait::async_trait;
|
||||
use axum_login::{AuthnBackend, UserId};
|
||||
use crate::users::UserCredentials;
|
||||
use leptos::server_fn::error::ServerFnErrorErr;
|
||||
}
|
||||
}
|
||||
|
||||
use axum_login::AuthUser;
|
||||
use async_trait::async_trait;
|
||||
use axum_login::{AuthnBackend, AuthUser, UserId};
|
||||
use crate::users::UserCredentials;
|
||||
use leptos::server_fn::error::ServerFnErrorErr;
|
||||
|
||||
use crate::models::User;
|
||||
|
||||
|
@ -12,11 +12,11 @@ pub mod users;
|
||||
pub mod search;
|
||||
pub mod fileserv;
|
||||
pub mod error_template;
|
||||
pub mod auth_backend;
|
||||
use cfg_if::cfg_if;
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(feature = "ssr")] {
|
||||
if #[cfg(feature = "ssr")] {
|
||||
pub mod auth_backend;
|
||||
pub mod schema;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user