update scaffold to import provided handlers
This commit is contained in:
parent
28e9a1f235
commit
bdd3639938
@ -1,6 +1,5 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Application
|
||||
@ -14,6 +13,7 @@ import Yesod.Static
|
||||
import Yesod.Auth
|
||||
import Yesod.Default.Config
|
||||
import Yesod.Default.Main
|
||||
import Yesod.Default.Handlers
|
||||
import Yesod.Logger (Logger)
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Dynamic (Dynamic, toDyn)
|
||||
@ -27,14 +27,6 @@ import Handler.Root
|
||||
-- the comments there for more details.
|
||||
mkYesodDispatch "~sitearg~" resources~sitearg~
|
||||
|
||||
-- Some default handlers that ship with the Yesod site template. You will
|
||||
-- very rarely need to modify this.
|
||||
getFaviconR :: Handler ()
|
||||
getFaviconR = sendFile "image/x-icon" "config/favicon.ico"
|
||||
|
||||
getRobotsR :: Handler RepPlain
|
||||
getRobotsR = return $ RepPlain $ toContent ("User-agent: *" :: ByteString)
|
||||
|
||||
-- This function allocates resources (such as a database connection pool),
|
||||
-- performs initialization and creates a WAI application. This is also the
|
||||
-- place to put your migrate statements to have automatic database
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Application
|
||||
@ -13,6 +12,7 @@ import Settings
|
||||
import Yesod.Static
|
||||
import Yesod.Default.Config
|
||||
import Yesod.Default.Main (defaultDevelApp, defaultRunner)
|
||||
import Yesod.Default.Handlers (getFaviconR, getRobotsR)
|
||||
import Yesod.Logger (Logger)
|
||||
import Data.ByteString (ByteString)
|
||||
import Network.Wai (Application)
|
||||
@ -26,14 +26,6 @@ import Handler.Root
|
||||
-- the comments there for more details.
|
||||
mkYesodDispatch "~sitearg~" resources~sitearg~
|
||||
|
||||
-- Some default handlers that ship with the Yesod site template. You will
|
||||
-- very rarely need to modify this.
|
||||
getFaviconR :: Handler ()
|
||||
getFaviconR = sendFile "image/x-icon" "config/favicon.ico"
|
||||
|
||||
getRobotsR :: Handler RepPlain
|
||||
getRobotsR = return $ RepPlain $ toContent ("User-agent: *" :: ByteString)
|
||||
|
||||
-- This function allocates resources (such as a database connection pool),
|
||||
-- performs initialization and creates a WAI application. This is also the
|
||||
-- place to put your migrate statements to have automatic database
|
||||
|
||||
Loading…
Reference in New Issue
Block a user