From de21a4e4b3462b75d1b45fce8ceef780baadd21d Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Thu, 21 Nov 2024 07:25:36 -0600 Subject: [PATCH] fix(rpc): correct config parameters --- app/Server.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Server.hs b/app/Server.hs index 68d1661..7944fe3 100644 --- a/app/Server.hs +++ b/app/Server.hs @@ -24,16 +24,19 @@ import Zenith.RPC ) import Zenith.Scanner (rescanZebra) import Zenith.Types (Config(..)) +import Zenith.Utils (getZenithPath) main :: IO () main = do config <- load ["$(HOME)/Zenith/zenith.cfg"] - dbFilePath <- require config "dbFilePath" + dbFileName <- require config "dbFileName" nodeUser <- require config "nodeUser" nodePwd <- require config "nodePwd" zebraPort <- require config "zebraPort" zebraHost <- require config "zebraHost" nodePort <- require config "nodePort" + dbFP <- getZenithPath + let dbFilePath = T.pack $ dbFP ++ dbFileName let myConfig = Config dbFilePath zebraHost zebraPort nodeUser nodePwd nodePort let ctx = authenticate myConfig :. EmptyContext w <- try $ checkZebra zebraHost zebraPort :: IO (Either IOError ZebraGetInfo)