2019-05-06 21:41:05 +00:00
|
|
|
module Types.Reader where
|
|
|
|
|
2019-12-19 01:40:54 +00:00
|
|
|
import qualified Data.Text as T
|
|
|
|
|
2019-05-06 21:41:05 +00:00
|
|
|
import Servant (Handler)
|
|
|
|
|
|
|
|
import Control.Monad.Reader (ReaderT)
|
|
|
|
|
|
|
|
import Database.PostgreSQL.Simple (Connection)
|
|
|
|
|
|
|
|
-- internal imports
|
|
|
|
|
|
|
|
import Types.Auth (TicketStore)
|
|
|
|
|
|
|
|
data ReadState = ReadState
|
2019-12-19 01:40:54 +00:00
|
|
|
{ rsConnection :: Connection
|
|
|
|
, rsTicketStore :: TicketStore
|
|
|
|
, rsCurrencySymbol :: T.Text
|
|
|
|
, rsSoftwareVersion :: T.Text
|
2019-05-06 21:41:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type MateHandler = ReaderT ReadState Handler
|