{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeApplications #-}
module Handler.Ad where

import Import

getAdR :: Handler Html
getAdR = do
  basePath <- getsYesod (appAdFilePath . appSettings)
  number <- applyAtomicGen (randomR (0 :: Int ,4)) globalStdGen
  sendFile typePng $ basePath <> "image" <> show number <> ".png"
