From bded0fb6bde0a19164c55196ff1f7ecc383e69b2 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Fri, 10 Apr 2015 22:28:34 +0200 Subject: [PATCH] Use shorter names --- src/Application.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Application.hs b/src/Application.hs index 80136ac..8253924 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -25,13 +25,13 @@ app runner = do (baseUrl,_) <- serverSettings table <- records - cssPath <- getDataFileName "layouts/main.css" - indexPath <- getDataFileName "views/index.html" - donePath <- getDataFileName "views/done.html" + css <- getDataFileName "layouts/main.css" + index <- getDataFileName "views/index.html" + done <- getDataFileName "views/done.html" runner $ controllerApp settings $ do - get "/" (render indexPath ()) - get "/main.css" (serveStatic cssPath) + get "/" (render index ()) + get "/main.css" (serveStatic css) get "/:word" $ do word <- queryParam' "word" @@ -48,5 +48,5 @@ app runner = do Just url -> do word <- liftIO (insert table url) logStr (printf "Registered %s -> %s " url word) - render donePath $ object ["link" .= (baseUrl ++ word)] + render done $ object ["link" .= (bindUrl ++ word)] Nothing -> respond badRequest