Add token authentication for controllers

This commit is contained in:
Tobias Reisinger 2025-05-31 23:19:38 +02:00
commit ebac452a86
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 21 additions and 1 deletions

View file

@ -72,6 +72,7 @@ async fn main() -> Result<(), std::io::Error> {
.app_data(web::JsonConfig::default().error_handler(handlers::json_error_handler))
.app_data(web::Data::new(pool.clone()))
.app_data(web::Data::new(app_state.clone()))
.app_data(web::Data::new(settings.clone()))
.service(
SwaggerUi::new("/api/docs/{_:.*}")
.external_urls_from_iter_unchecked([("/api/v1.json", api_v1_json.clone())]),