fix: pinned mailserver default value
This commit is contained in:
parent
199d5a0342
commit
4b72e5dde0
|
@ -71,12 +71,12 @@ proc getFleet*(): Fleet =
|
||||||
result = parseEnum[Fleet](fleet)
|
result = parseEnum[Fleet](fleet)
|
||||||
|
|
||||||
proc getPinnedMailserver*(): string =
|
proc getPinnedMailserver*(): string =
|
||||||
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers)
|
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers, %*{})
|
||||||
let fleet = getSetting[string](Setting.Fleet, $Fleet.PROD)
|
let fleet = getSetting[string](Setting.Fleet, $Fleet.PROD)
|
||||||
return pinnedMailservers{fleet}.getStr()
|
return pinnedMailservers{fleet}.getStr()
|
||||||
|
|
||||||
proc pinMailserver*(enode: string = "") =
|
proc pinMailserver*(enode: string = "") =
|
||||||
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers)
|
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers, %*{})
|
||||||
let fleet = getSetting[string](Setting.Fleet, $Fleet.PROD)
|
let fleet = getSetting[string](Setting.Fleet, $Fleet.PROD)
|
||||||
pinnedMailservers[fleet] = newJString(enode)
|
pinnedMailservers[fleet] = newJString(enode)
|
||||||
discard saveSetting(Setting.PinnedMailservers, pinnedMailservers)
|
discard saveSetting(Setting.PinnedMailservers, pinnedMailservers)
|
||||||
|
|
Loading…
Reference in New Issue