small changes suggested by @diogob

This commit is contained in:
Ruslan Talpa
2015-09-29 11:40:33 +03:00
parent 1da26cac98
commit 94b1d2815c
7 changed files with 7 additions and 18 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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"
-3
View File
@@ -1,6 +1,3 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module PostgREST.Auth where
import Control.Applicative
-2
View File
@@ -1,5 +1,3 @@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
+2 -3
View File
@@ -1,7 +1,6 @@
--{-# LANGUAGE QuasiQuotes, ScopedTypeVariables, OverloadedStrings, FlexibleContexts #-}
module PostgREST.Parsers
-- ( parseGetRequest
-- )
( parseGetRequest
)
where
import Control.Applicative hiding ((<$>))
-4
View File
@@ -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