list warrens + explore nested folders

This commit is contained in:
2025-07-12 06:39:43 +02:00
parent f9f55895ed
commit 4d0765c53b
38 changed files with 1877 additions and 93 deletions

21
backend/src/api/state.rs Normal file
View File

@@ -0,0 +1,21 @@
use sqlx::{Pool, Postgres};
#[derive(Debug, Clone)]
pub struct AppState {
pool: Pool<Postgres>,
serve_dir: String,
}
impl AppState {
pub fn new(pool: Pool<Postgres>, serve_dir: String) -> Self {
Self { pool, serve_dir }
}
pub fn pool(&self) -> &Pool<Postgres> {
&self.pool
}
pub fn serve_dir(&self) -> &str {
&self.serve_dir
}
}