avoid ByteString -> Text -> ByteString converstion of the response body
This commit is contained in:
@@ -92,7 +92,7 @@ app dbstructure conf reqBody dbrole req =
|
|||||||
$ qs
|
$ qs
|
||||||
)
|
)
|
||||||
row <- H.maybeEx q
|
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
|
to = from+queryTotal-1
|
||||||
contentRange = contentRangeH from to tableTotal
|
contentRange = contentRangeH from to tableTotal
|
||||||
status = rangeStatus from to tableTotal
|
status = rangeStatus from to tableTotal
|
||||||
@@ -107,7 +107,7 @@ app dbstructure conf reqBody dbrole req =
|
|||||||
"/" <> cs table <>
|
"/" <> cs table <>
|
||||||
if Prelude.null canonical then "" else "?" <> cs canonical
|
if Prelude.null canonical then "" else "?" <> cs canonical
|
||||||
)
|
)
|
||||||
] (cs $ fromMaybe "[]" body)
|
] (fromMaybe "[]" body)
|
||||||
|
|
||||||
where
|
where
|
||||||
from = fromMaybe 0 $ rangeOffset <$> range
|
from = fromMaybe 0 $ rangeOffset <$> range
|
||||||
|
|||||||
Reference in New Issue
Block a user