Add token authentication for controllers
This commit is contained in:
parent
f90be43bd2
commit
ebac452a86
3 changed files with 21 additions and 1 deletions
|
|
@ -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())]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue