feat: show secret on admin detail page #12
cargo devel CI / cargo CI (push) Successful in 1m54s Details

This commit is contained in:
Christoph J. Scherr 2024-09-11 21:13:57 +02:00
parent 3204047b28
commit 41b173de40
3 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,7 @@
</svg>
{{challenge.solution}}
</p>
<code>{{secret}}</code>
</div>
</div>
</div>

View File

@ -58,6 +58,7 @@ async fn details(
..default_context(),
..context!(
challenge => challenge,
secret => vault.secret(),
title => "Wooly-Vault Admin Interface",
contestants => vault.contestants().await.iter().collect::<Vec<_>>(),
winners => vault.winners().await.iter().collect::<Vec<_>>(),

View File

@ -17,7 +17,7 @@ use tokio::sync::Mutex;
/// This type is used to share a [`Vault`] instance across multiple parts of the application.
pub type VaultRef = Arc<Vault>;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, PartialOrd, Ord)]
pub struct Contestant {
ip: IpAddr,
}