diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-10-15 23:58:52 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-10-15 23:58:52 +0200 |
commit | 79479ba8babfc40a0d0731fec41b2e8426fbe7f2 (patch) | |
tree | cf13fb9c048c2b7211ab37dd3c8e6dde79bc7ce5 /planetwars-server | |
parent | 8feccfeb234b69b1069d6b972f13b77ee2c0459f (diff) | |
download | planetwars.dev-79479ba8babfc40a0d0731fec41b2e8426fbe7f2.tar.xz planetwars.dev-79479ba8babfc40a0d0731fec41b2e8426fbe7f2.zip |
only show bot stderr to its owner
Diffstat (limited to 'planetwars-server')
-rw-r--r-- | planetwars-server/src/routes/matches.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/planetwars-server/src/routes/matches.rs b/planetwars-server/src/routes/matches.rs index 24d0b7e..10f5c5d 100644 --- a/planetwars-server/src/routes/matches.rs +++ b/planetwars-server/src/routes/matches.rs @@ -32,6 +32,7 @@ pub struct ApiMatchPlayer { bot_version_id: Option<i32>, bot_id: Option<i32>, bot_name: Option<String>, + owner_id: Option<i32>, had_errors: Option<bool>, } @@ -124,6 +125,7 @@ pub fn match_data_to_api(data: matches::FullMatchData) -> ApiMatch { bot_version_id: p.bot_version.as_ref().map(|cb| cb.id), bot_id: p.bot.as_ref().map(|b| b.id), bot_name: p.bot.as_ref().map(|b| b.name.clone()), + owner_id: p.bot.as_ref().and_then(|b| b.owner_id), had_errors: p.base.had_errors, }) .collect(), |