flip app args

This commit is contained in:
Adam C. Baker
2014-10-10 15:54:05 -07:00
parent 94e0a4b96a
commit 0879ed7110
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -59,14 +59,14 @@ withUser name pass role action conn = do
withApp :: ActionWith Application -> ActionWith Connection
withApp action conn = do
runRaw conn "begin;"
action $ cors corsPolicy $ app conn "dbapi_anonymous"
action $ cors corsPolicy $ app "dbapi_anonymous" conn
rollback conn
appWithFixture :: ActionWith Application -> IO ()
appWithFixture action = withDatabaseConnection $ \c -> do
result <- tryJust transactionAborted $ do
runRaw c "begin;"
action $ cors corsPolicy $ app c "dbapi_anonymous"
action $ cors corsPolicy $ app "dbapi_anonymous" c
rollback c
when (isLeft result) $