mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add basic RC steam and user/pass authentication
This commit is contained in:
1 parent
82d0c3d0f3
commit
49357b2759
23 files changed
+488
-86
No files matched your search
+17
-2
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user