refactor: update AppState references to use state module
- Change all instances of AppState to reference the new state module across multiple files for consistency. - Clean up imports in auth, books, index_jobs, libraries, pages, search, settings, thumbnails, and tokens modules. - Simplify main.rs by removing unused code and organizing middleware and route handlers under the new handlers module.
This commit is contained in:
20
apps/indexer/src/lib.rs
Normal file
20
apps/indexer/src/lib.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
pub mod api;
|
||||
pub mod batch;
|
||||
pub mod job;
|
||||
pub mod meili;
|
||||
pub mod scheduler;
|
||||
pub mod scanner;
|
||||
pub mod utils;
|
||||
pub mod watcher;
|
||||
pub mod worker;
|
||||
|
||||
use sqlx::PgPool;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AppState {
|
||||
pub pool: PgPool,
|
||||
pub meili_url: String,
|
||||
pub meili_master_key: String,
|
||||
pub api_base_url: String,
|
||||
pub api_bootstrap_token: String,
|
||||
}
|
||||
Reference in New Issue
Block a user