feat: todo's, add image cache control
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user