]> Git — Sourcephile - comptalang.git/blob - web/Handler/Common.hs
Ajout : Hcompta.Chart.
[comptalang.git] / web / Handler / Common.hs
1 {-# LANGUAGE TemplateHaskell #-}
2 -- | Common handler functions.
3 module Handler.Common where
4
5 import Data.FileEmbed (embedFile)
6 import Import
7
8 -- These handlers embed files in the executable at compile time to avoid a
9 -- runtime dependency, and for efficiency.
10
11 getFaviconR :: Handler TypedContent
12 getFaviconR = return $ TypedContent "image/x-icon"
13 $ toContent $(embedFile "config/favicon.ico")
14
15 getRobotsR :: Handler TypedContent
16 getRobotsR = return $ TypedContent typePlain
17 $ toContent $(embedFile "config/robots.txt")