small changes suggested by @diogob
This commit is contained in:
+2
-2
@@ -98,7 +98,7 @@ library
|
||||
Exposed-Modules: PostgREST.App
|
||||
, PostgREST.Types
|
||||
, PostgREST.Parsers
|
||||
, PostgREST.Functions
|
||||
, PostgREST.QueryBuilder
|
||||
, PostgREST.Auth
|
||||
, PostgREST.Config
|
||||
, PostgREST.Error
|
||||
@@ -121,7 +121,7 @@ Test-Suite spec
|
||||
Other-Modules: PostgREST.App
|
||||
, PostgREST.Types
|
||||
, PostgREST.Parsers
|
||||
, PostgREST.Functions
|
||||
, PostgREST.QueryBuilder
|
||||
, PostgREST.Auth
|
||||
, PostgREST.Config
|
||||
, PostgREST.Error
|
||||
|
||||
@@ -52,7 +52,7 @@ import PostgREST.PgQuery
|
||||
import PostgREST.RangeQuery
|
||||
import PostgREST.PgStructure
|
||||
import PostgREST.Parsers
|
||||
import PostgREST.Functions
|
||||
import PostgREST.QueryBuilder
|
||||
|
||||
import Prelude
|
||||
|
||||
@@ -78,7 +78,7 @@ app dbstructure conf reqBody dbrole req =
|
||||
else
|
||||
-- return $ responseLBS status416 [] $ cs $ show queries
|
||||
case queries of
|
||||
Left e -> return $ responseLBS status200 [("Content-Type", "text/plain")] $ cs e
|
||||
Left e -> return $ responseLBS status400 [("Content-Type", "text/plain")] $ cs e
|
||||
Right (qs, cqs) -> do
|
||||
let qt = qualify table
|
||||
count = if hasPrefer "count=none"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
module PostgREST.Auth where
|
||||
|
||||
import Control.Applicative
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
module Main where
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
--{-# LANGUAGE QuasiQuotes, ScopedTypeVariables, OverloadedStrings, FlexibleContexts #-}
|
||||
module PostgREST.Parsers
|
||||
-- ( parseGetRequest
|
||||
-- )
|
||||
( parseGetRequest
|
||||
)
|
||||
where
|
||||
|
||||
import Control.Applicative hiding ((<$>))
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TypeSynonymInstances #-}
|
||||
module PostgREST.PgStructure where
|
||||
|
||||
@@ -10,9 +8,7 @@ import Data.List (find)
|
||||
import Data.Text (Text, split)
|
||||
import PostgREST.PgQuery ()
|
||||
import PostgREST.Types
|
||||
--import Data.Aeson
|
||||
import Data.Functor.Identity
|
||||
--import Data.String.Conversions (cs)
|
||||
import Control.Applicative
|
||||
import Data.Maybe (fromMaybe, isJust, mapMaybe)
|
||||
import Data.Monoid
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module PostgREST.Functions
|
||||
module PostgREST.QueryBuilder
|
||||
where
|
||||
|
||||
|
||||
Reference in New Issue
Block a user