summaryrefslogtreecommitdiff
path: root/Biz/Que/Site.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Que/Site.hs')
-rw-r--r--Biz/Que/Site.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Biz/Que/Site.hs b/Biz/Que/Site.hs
index e027717..7151cd0 100644
--- a/Biz/Que/Site.hs
+++ b/Biz/Que/Site.hs
@@ -31,7 +31,9 @@ main = Cli.main <| Cli.Plan help move test pure
move :: Cli.Arguments -> IO ()
move args = do
- let (Just src, Just ns) = (getArg "src", Text.pack </ getArg "ns")
+ let (src, ns) = case (getArg "src", Text.pack </ getArg "ns") of
+ (Just s, Just n) -> (s, n)
+ _ -> panic "could not initialize from CLI arguments"
mKey <- getKey ns
putText <| "serving " <> Text.pack src <> " at " <> ns
run mKey ns
@@ -132,7 +134,7 @@ serve Nothing "pub" path content =
mempty
liftIO <| pure ()
serve Nothing p _ _ = panic <| "no auth key provided for ns: " <> p
-serve (Just key) ns path content =
+serve (Just _) ns path content =
runReq defaultHttpConfig <| do
let options =
header "Content-type" "text/html;charset=utf-8"