From 864c865e52f5428cb04d5923e5cc70fa4c4fdc9f Mon Sep 17 00:00:00 2001 From: Ruslan Talpa Date: Thu, 15 Oct 2015 16:20:57 +0300 Subject: [PATCH] avoid ByteString -> Text -> ByteString converstion of the response body --- src/PostgREST/App.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PostgREST/App.hs b/src/PostgREST/App.hs index f9044832d..41bb2dcb5 100644 --- a/src/PostgREST/App.hs +++ b/src/PostgREST/App.hs @@ -92,7 +92,7 @@ app dbstructure conf reqBody dbrole req = $ qs ) row <- H.maybeEx q - let (tableTotal, queryTotal, body) = fromMaybe (Just (0::Int), 0::Int, Just "" :: Maybe Text) row + let (tableTotal, queryTotal, body) = fromMaybe (Just (0::Int), 0::Int, Just "" :: Maybe BL.ByteString) row to = from+queryTotal-1 contentRange = contentRangeH from to tableTotal status = rangeStatus from to tableTotal @@ -107,7 +107,7 @@ app dbstructure conf reqBody dbrole req = "/" <> cs table <> if Prelude.null canonical then "" else "?" <> cs canonical ) - ] (cs $ fromMaybe "[]" body) + ] (fromMaybe "[]" body) where from = fromMaybe 0 $ rangeOffset <$> range