From 3fcb323b049f076e0dfd2527de981a173e260086 Mon Sep 17 00:00:00 2001 From: defanor Date: Wed, 20 Feb 2019 12:33:50 +0300 Subject: Allow requests without queries Apply a stylesheet to in that case. This is slightly out of the project scope, but handy in some cases (helps to avoid dummy queries or additional software), and done with a single line change. --- Main.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Main.hsc') diff --git a/Main.hsc b/Main.hsc index 3c247de..47a4366 100644 --- a/Main.hsc +++ b/Main.hsc @@ -301,7 +301,7 @@ serve xsltDirectory ioc ps = case lookup "q" ps of if pNeeded || pUsed then requireAuth else redb 500 [("message", "Database connection failed")] - _ -> respError 418 [("message", "No query is provided")] + _ -> resp 200 "" where xsltPath = xsltDirectory takeFileName (BS.unpack $ fromMaybe "default" $ lookup "t" ps) -- cgit v1.2.3