From 53d90987ff2ca30176fa734090caa1172dcc2b75 Mon Sep 17 00:00:00 2001 From: "Adam C. Baker" Date: Sun, 6 Jul 2014 20:12:23 -0700 Subject: [PATCH] don't just get the default host for every connect option. --- Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Main.hs b/Main.hs index 2305b5c35..4c00747a1 100644 --- a/Main.hs +++ b/Main.hs @@ -53,8 +53,8 @@ connInfo config = defaultConnectInfo { } where opts = parseDatabaseUrl $ configDb config - fromOpt key = maybe (connectHost defaultConnectInfo) unpack $ lookup key opts - [host, user, pass, db] = map fromOpt ["host", "user", "password", "dbname"] + fromOpt (fn, key) = maybe (fn defaultConnectInfo) unpack $ lookup key opts + [host, user, pass, db] = map fromOpt [(connectHost, "host"), (connectUser, "user"), (connectPassword, "password"), (connectDatabase, "dbname")] app :: AppConfig -> Application app config req respond =