1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Create basic CDN endpoints for #10

This commit is contained in:
NG (Graham)
2025-05-24 16:21:45 -04:00
parent e7de53929d
commit 59612e6aa3
12 changed files with 53 additions and 7 deletions

View File

@@ -3,5 +3,6 @@ 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");
log::debug!("RC asset at {} (exists? {})", path.display(), path.exists());
actix_files::NamedFile::open_async(path).await
}