[Add] Structure

This commit is contained in:
Alex Emmet 2026-07-20 22:22:12 +02:00
commit c363ea48d0
27 changed files with 1730 additions and 1400 deletions

View file

@ -0,0 +1,17 @@
use std::sync::Arc;
use crate::{app_state::AppState, rho::rho_connection::RhoConnection};
pub struct UserService {
state: Arc<AppState>,
}
impl UserService {
pub fn new(state: Arc<AppState>) -> Self {
Self { state }
}
pub async fn connection_for_user(&self, user_id: i64) -> Option<Arc<RhoConnection>> {
self.state.rho.get_for_user(user_id).await
}
}