Add Y.Default.Handlers

* Provides the standard getFaviconR and getRobotsR
This commit is contained in:
patrick brisbin 2011-09-27 15:20:37 -04:00
parent affeaee3f7
commit 28e9a1f235
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Default.Handlers
( getFaviconR
, getRobotsR
) where
import Yesod.Handler (GHandler, sendFile)
import Yesod.Content (RepPlain(..), ToContent(..))
getFaviconR :: GHandler s m ()
getFaviconR = sendFile "image/x-icon" "config/favicon.ico"
getRobotsR :: GHandler s m RepPlain
getRobotsR = return $ RepPlain $ toContent ("User-agent: *" :: String)

View File

@ -37,6 +37,7 @@ library
exposed-modules: Yesod.Default.Config
, Yesod.Default.Main
, Yesod.Default.Util
, Yesod.Default.Handlers
ghc-options: -Wall