[fix] conf

This commit is contained in:
roydfalk 2024-08-28 06:15:01 +02:00
parent 9893e60bf3
commit 8ecd0bd63e

View file

@ -221,7 +221,7 @@ namespace _espe.conf
conf_raw : any conf_raw : any
) : void ) : void
{ {
const version : int = conf_raw["version"]; const version : int = (conf_raw["version"] ?? 4);
_data = { _data = {
"general": ( "general": (
((node_general) => ({ ((node_general) => ({
@ -229,7 +229,8 @@ namespace _espe.conf
"verification_secret": (node_general["verification_secret"] ?? null), "verification_secret": (node_general["verification_secret"] ?? null),
})) (conf_raw["general"] ?? {}) })) (conf_raw["general"] ?? {})
), ),
"log": (() => { "log": (
(() => {
switch (version) { switch (version) {
case 1: { case 1: {
return [ return [
@ -250,7 +251,7 @@ namespace _espe.conf
?? ??
[ [
{ {
"kind": "console", "kind": "stdout",
"data": { "data": {
} }
}, },
@ -273,7 +274,8 @@ namespace _espe.conf
break; break;
} }
} }
}) (), }) ()
),
"server": ( "server": (
((node_server) => ({ ((node_server) => ({
"host": (() => { "host": (() => {