35ef7e8
use std::sync::Arc;
use config::AppConfig;
use export::{AppDatabase, AppState};
use storage::S3Client;
#[derive(Clone)]
pub struct UserService {
pub state: AppState,
}
impl UserService {
pub fn new(state: AppState) -> Self {
Self { state }
}
pub fn config(&self) -> &AppConfig {
&self.state.config
}
pub fn db(&self) -> &Arc<AppDatabase> {
&self.state.database
}
pub fn storage(&self) -> &Arc<S3Client> {
&self.state.storage
}
}