Fixed Docker UPGRADING instructions

This commit is contained in:
mdecimus
2024-05-15 16:02:36 +02:00
parent 5ae7a0b7d4
commit 7baa088a19
4 changed files with 224 additions and 199 deletions

View File

@@ -21,10 +21,14 @@
* for more details.
*/
use std::collections::HashMap;
use prettytable::{Attr, Cell, Row, Table};
use reqwest::Method;
use serde_json::Value;
use crate::modules::Response;
use super::cli::{Client, ServerCommands};
impl ServerCommands {
@@ -70,12 +74,13 @@ impl ServerCommands {
}
ServerCommands::ListConfig { prefix } => {
let results = client
.http_request::<Vec<(String, String)>, String>(
.http_request::<Response<HashMap<String, String>>, String>(
Method::GET,
&format!("/api/settings/{}", prefix.unwrap_or_default()),
&format!("/api/settings/list/{}", prefix.unwrap_or_default()),
None,
)
.await;
.await
.items;
if !results.is_empty() {
let mut table = Table::new();

View File

@@ -123,6 +123,12 @@ pub struct List<T> {
pub total: u64,
}
#[derive(Clone, serde::Serialize, serde::Deserialize, Default)]
pub struct Response<T> {
pub items: T,
pub total: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct PrincipalUpdate {
action: PrincipalAction,