mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
rc_society dashboard display (#131)
### Description Closes #130 ### Please confirm - [x] I am the legal owner or represent the legal owner of all work submitted (including LLM-generated code, if any) - [x] I consent to my changes being added to this FOSS project - [x] I have confirmed that this does not add new errors or warnings with `utils/clippy.sh` - [ ] This PR used LLMs to generate some or all of the code changes Reviewed-on: https://git.ngram.ca/OpenJam/rc-servers/pulls/131
This commit is contained in:
@@ -26,6 +26,7 @@ async fn main() -> std::io::Result<()> {
|
||||
let config = oj_rc_core::ConfigImpl::load(&cli_args.assets_robocraft)?;
|
||||
|
||||
let server_settings = actix_web::web::Data::new(<oj_rc_core::ConfigImpl as oj_rc_core::ConfigProvider<()>>::server_config(&config));
|
||||
let server_links = actix_web::web::Data::new(<oj_rc_core::ConfigImpl as oj_rc_core::ConfigProvider<()>>::url_links(&config));
|
||||
|
||||
let parsers = oj_rc_core::cubes::CubeParsers::new(&config);
|
||||
|
||||
@@ -36,6 +37,8 @@ async fn main() -> std::io::Result<()> {
|
||||
let parsers_ref = actix_web::web::Data::new(parsers);
|
||||
|
||||
let users = oj_rc_core::UserImpl::load(&cli_args.data_robocraft, &config).await.expect("Bad user data");
|
||||
let factory = <oj_rc_core::persist::config::ConfigImpl as oj_rc_core::ConfigProvider<()>>::factory(&config, &|| users.factory_impl()).await.expect("Bad vehicle factory (CRF) config");
|
||||
let factory_ref = actix_web::web::Data::new(factory);
|
||||
let auth_ref = actix_web::web::Data::new(Box::new(users));
|
||||
|
||||
let cli_args2 = actix_web::web::Data::new(cli_args.clone());
|
||||
@@ -72,9 +75,11 @@ async fn main() -> std::io::Result<()> {
|
||||
.app_data(loadeds_args.clone())
|
||||
.app_data(handlebars_ref.clone())
|
||||
.app_data(server_settings.clone())
|
||||
.app_data(server_links.clone())
|
||||
.app_data(auth_ref.clone())
|
||||
.app_data(importers_ref.clone())
|
||||
.app_data(parsers_ref.clone())
|
||||
.app_data(factory_ref.clone())
|
||||
.service(version_info)
|
||||
.service(web::login::form_submit)
|
||||
.service(web::login::form_load)
|
||||
|
||||
Reference in New Issue
Block a user