feat: todo's, add image cache control

This commit is contained in:
2026-03-20 21:47:48 +01:00
parent 12388a9908
commit a0699273f1
8 changed files with 142 additions and 34 deletions

View File

@@ -14,6 +14,8 @@ pub struct AppState {
/// Leaks memory for the sake of not atomic'ing all over.
#[expect(clippy::missing_errors_doc)]
pub async fn start_app(args: crate::args::Args, config: crate::conf::Config) -> io::Result<()> {
use crate::consts::web_scopes as ws;
let config = Box::leak(Box::new(config));
let cache = caches::AppCache::new(
@@ -38,8 +40,7 @@ pub async fn start_app(args: crate::args::Args, config: crate::conf::Config) ->
HttpServer::new(move || {
App::new()
.app_data(web::Data::new(app))
.service(services::get_image)
// .service(factory)
.service(services::images::make_scope(ws::IMAGES))
})
.bind(&app.config.server.listen)?
.run()