Added machine field on empire routes

This commit is contained in:
Neshura 2023-09-08 23:06:56 +02:00
parent 097b6884b9
commit 464f870c29
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
2 changed files with 4 additions and 0 deletions

View file

@ -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,

View file

@ -195,6 +195,7 @@ pub struct ChellarisEmpire {
pub game: i32,
pub name: String,
pub discord_user: Option<String>,
pub machine: bool,
pub gestalt: bool,
pub portrait_id: i32,
pub portrait_group_id: i32,