Use hasql-transaction

Also use hspec before-wrapper
This commit is contained in:
Joe Nelson
2016-02-21 18:05:25 -08:00
parent 30e5032ade
commit d5c1438c6e
7 changed files with 18 additions and 31 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ import Data.Aeson
import Data.Aeson.Types (emptyArray)
import Data.Monoid
import qualified Data.Vector as V
import qualified Hasql.Session as H
import qualified Hasql.Transaction as H
import PostgREST.Config (AppConfig (..))
import PostgREST.Parsers
@@ -58,7 +58,7 @@ import PostgREST.QueryBuilder ( callProc
import Prelude
app :: DbStructure -> AppConfig -> RequestBody -> Request -> H.Session Response
app :: DbStructure -> AppConfig -> RequestBody -> Request -> H.Transaction Response
app dbStructure conf reqBody req =
let
-- TODO: blow up for Left values (there is a middleware that checks the headers)