Skip to content

Commit b79a242

Browse files
committed
chore(pedm): convert JSON config to PascalCase
1 parent abc57f9 commit b79a242

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"db": "libsql",
3-
"libsql": {
4-
"path": "C:/ProgramData/Devolutions/Agent/pedm/pedm.sqlite"
2+
"Db": "Libsql",
3+
"Libsql": {
4+
"Path": "C:/ProgramData/Devolutions/Agent/pedm/pedm.sqlite"
55
},
6-
"postgres": {
7-
"host": "192.168.0.100",
8-
"dbname": "pedm",
9-
"user": "pedm",
10-
"password": "pedm"
6+
"Postgres": {
7+
"Host": "192.168.0.100",
8+
"Dbname": "pedm",
9+
"User": "pedm",
10+
"Password": "pedm"
1111
}
1212
}

crates/devolutions-pedm/src/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::data_dir;
99

1010
/// The application config.
1111
#[derive(Serialize, Deserialize)]
12+
#[serde(rename_all = "PascalCase")]
1213
pub(crate) struct Config {
1314
/// The selected database backend.
1415
///
@@ -67,7 +68,7 @@ impl Config {
6768
}
6869

6970
#[derive(Serialize, Deserialize, Default, Debug)]
70-
#[serde(rename_all = "lowercase")]
71+
#[serde(rename_all = "PascalCase")]
7172
pub enum DbBackend {
7273
#[cfg_attr(feature = "libsql", default)]
7374
#[cfg(feature = "libsql")]
@@ -89,13 +90,15 @@ impl fmt::Display for DbBackend {
8990
}
9091

9192
#[derive(Serialize, Deserialize)]
93+
#[serde(rename_all = "PascalCase")]
9294
pub(crate) struct LibsqlConfig {
9395
/// The path to the SQLite database file.
9496
pub(crate) path: Utf8PathBuf,
9597
}
9698

9799
// TODO: SSL support
98100
#[derive(Serialize, Deserialize)]
101+
#[serde(rename_all = "PascalCase")]
99102
pub(crate) struct PgConfig {
100103
pub(crate) host: String,
101104
pub(crate) dbname: String,

0 commit comments

Comments
 (0)