handle empty body on get request.

This commit is contained in:
Adam C. Baker
2014-08-02 16:52:13 -07:00
parent 50cd701624
commit 60e1f920ab
+1
View File
@@ -31,6 +31,7 @@ selectWhere ver table qq range conn = do
r <- quickQuery conn (BS.unpack $ s <> w) []
let body = case r of
[[SqlNull]] -> "[]"::BL.ByteString
[[json]] -> fromSql json
_ -> "" :: BL.ByteString
return body