handle empty body on get request.
This commit is contained in:
@@ -31,6 +31,7 @@ selectWhere ver table qq range conn = do
|
|||||||
r <- quickQuery conn (BS.unpack $ s <> w) []
|
r <- quickQuery conn (BS.unpack $ s <> w) []
|
||||||
|
|
||||||
let body = case r of
|
let body = case r of
|
||||||
|
[[SqlNull]] -> "[]"::BL.ByteString
|
||||||
[[json]] -> fromSql json
|
[[json]] -> fromSql json
|
||||||
_ -> "" :: BL.ByteString
|
_ -> "" :: BL.ByteString
|
||||||
return body
|
return body
|
||||||
|
|||||||
Reference in New Issue
Block a user