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

Add immediate variant for singleplayer vehicle, misc tweaks

This commit is contained in:
NG (Graham)
2025-05-31 11:38:41 -04:00
parent 093bc42e97
commit 9281069374
5 changed files with 46 additions and 36 deletions

View File

@@ -11,11 +11,15 @@ impl ArcAdapter {
log::debug!("Connecting to Archive of RoboCraft (ARC) vehicle factory database URI: {}", uri);
let db = sea_orm::Database::connect(uri).await?;
let good_cdn = override_cdn.map(|s| if s.ends_with("/") { s } else { format!("{}/", s) });
Ok(Self {
let adapter = Self {
orm: db,
ignore_expiry: show_expired,
cdn: good_cdn,
})
};
// do query to ensure database is ok
adapter.default_query().one(&adapter.orm).await?;
Ok(adapter)
}
fn default_query(&self) -> sea_orm::Select<super::entities::robot_metadata::Entity> {