admin and cli: hide secret keys unless asked

This commit is contained in:
Alex Auvolat
2023-06-14 16:56:15 +02:00
parent 4a82f6380e
commit 7895f99d3a
7 changed files with 58 additions and 22 deletions
+4
View File
@@ -152,6 +152,10 @@ pub fn json_ok_response<T: Serialize>(res: &T) -> Result<Response<Body>, Error>
.body(Body::from(resp_json))?)
}
pub fn is_default<T: Default + PartialEq>(v: &T) -> bool {
*v == T::default()
}
#[cfg(test)]
mod tests {
use super::*;