flip app args
This commit is contained in:
+2
-2
@@ -84,8 +84,8 @@ httpRequesterRole hdrs conn = do
|
||||
_ -> return NoCredentials
|
||||
|
||||
|
||||
app :: Connection -> DbRole -> Application
|
||||
app conn anonymous req respond = do
|
||||
app :: DbRole -> Connection -> Application
|
||||
app anonymous conn req respond = do
|
||||
attempt <- httpRequesterRole (requestHeaders req) conn
|
||||
|
||||
case attempt of
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ main = do
|
||||
|
||||
Prelude.putStrLn $ "Listening on port " ++ (show $ configPort conf :: String)
|
||||
conn <- connectPostgreSQL' dburi
|
||||
runTLS tls settings $ gzip def $ cors corsPolicy $ reportPgErrors $ app conn (cs $ configAnonRole conf)
|
||||
runTLS tls settings $ gzip def $ cors corsPolicy $ reportPgErrors $ app (cs $ configAnonRole conf) conn
|
||||
|
||||
where
|
||||
describe = progDesc "create a REST API to an existing Postgres database"
|
||||
|
||||
Reference in New Issue
Block a user