Add basic RC steam and user/pass authentication

This commit is contained in:
NGnius (Graham) committed 2025-01-27 19:52:57 -05:00
1 parent 82d0c3d0f3
commit 49357b2759
23 files changed
+488 -86

No files matched your search

+17 -2
View File
@@ -1,4 +1,9 @@
mod common;
#[cfg(feature = "cardlife")]
mod cardlife;
#[cfg(feature = "robocraft")]
mod robocraft;
#[rocket::get("/")]
fn index() -> &'static str {
@@ -8,7 +13,17 @@ fn index() -> &'static str {
#[rocket::launch]
fn rocket() -> _ {
env_logger::init();
rocket::build().mount("/", rocket::routes![index])
.attach(cardlife::stage())
#[allow(unused_mut)]
let mut builder = rocket::build().mount("/", rocket::routes![index]);
#[cfg(feature = "cardlife")]
{builder = builder.attach(cardlife::stage());}
#[cfg(feature = "robocraft")]
{builder = builder.attach(robocraft::stage());}
builder
}
#[cfg(all(feature = "steam", feature = "robocraft", feature = "cardlife"))]
compile_error!("Feature \"steam\" cannot work with features \"cardlife\" and \"robocraft\" at the same time");