mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Replace rc_static_data with general CDN implementation
This commit is contained in:
7
cdn/src/robocraft/live_data.rs
Normal file
7
cdn/src/robocraft/live_data.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
use actix_web::{get, Responder, web::Data};
|
||||
|
||||
#[get("/live/data.json")]
|
||||
pub async fn live_data_json(cli: Data<crate::cli::CliArgs>) -> impl Responder {
|
||||
let path = std::path::PathBuf::from(&cli.assets_robocraft).join("live_data.json");
|
||||
actix_files::NamedFile::open_async(path).await
|
||||
}
|
||||
1
cdn/src/robocraft/mod.rs
Normal file
1
cdn/src/robocraft/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod live_data;
|
||||
Reference in New Issue
Block a user