mod profile;
mod profiles;
mod profiles_identity;
use std::sync::Arc;
use crate::biome::profile::store::UserProfileStore;
use crate::rest_api::{Resource, RestResourceProvider};
pub struct BiomeProfileRestResourceProvider {
profile_store: Arc<dyn UserProfileStore>,
}
impl BiomeProfileRestResourceProvider {
pub fn new(profile_store: Arc<dyn UserProfileStore>) -> Self {
Self { profile_store }
}
}
impl RestResourceProvider for BiomeProfileRestResourceProvider {
fn resources(&self) -> Vec<Resource> {
vec![
profiles::make_profiles_list_route(self.profile_store.clone()),
profiles_identity::make_profiles_routes(self.profile_store.clone()),
profile::make_profile_route(self.profile_store.clone()),
]
}
}