From 464f870c29db22c14687ef1f66a42971168351cb Mon Sep 17 00:00:00 2001 From: Neshura Date: Fri, 8 Sep 2023 23:06:56 +0200 Subject: [PATCH] Added machine field on empire routes --- src/v3/mod.rs | 3 +++ src/v3/schemas.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/v3/mod.rs b/src/v3/mod.rs index 9d56bce..3e4c361 100644 --- a/src/v3/mod.rs +++ b/src/v3/mod.rs @@ -806,6 +806,7 @@ pub(crate) async fn get_empire( game: db_empire.game_id, name: db_empire.name, discord_user: db_empire.discord_user, + machine: db_empire.portrait_group_id.to_string() == dotenv!("MACHINE_GROUP_ID"), gestalt: db_empire.gestalt, portrait_id: db_empire.portrait_id, portrait_group_id: db_empire.portrait_group_id, @@ -939,6 +940,7 @@ pub(crate) async fn create_empire( game: db_empire.game_id, name: db_empire.name, discord_user: db_empire.discord_user, + machine: db_empire.portrait_group_id.to_string() == dotenv!("MACHINE_GROUP_ID"), gestalt: db_empire.gestalt, portrait_id: db_empire.portrait_id, portrait_group_id: db_empire.portrait_group_id, @@ -1173,6 +1175,7 @@ pub(crate) async fn edit_empire( game: db_empire.game_id, name: db_empire.name, discord_user: db_empire.discord_user, + machine: db_empire.portrait_group_id.to_string() == dotenv!("MACHINE_GROUP_ID"), gestalt: db_empire.gestalt, portrait_id: db_empire.portrait_id, portrait_group_id: db_empire.portrait_group_id, diff --git a/src/v3/schemas.rs b/src/v3/schemas.rs index 7320358..df628d7 100644 --- a/src/v3/schemas.rs +++ b/src/v3/schemas.rs @@ -195,6 +195,7 @@ pub struct ChellarisEmpire { pub game: i32, pub name: String, pub discord_user: Option, + pub machine: bool, pub gestalt: bool, pub portrait_id: i32, pub portrait_group_id: i32,