matebeamter/src/Types/Auth.hs

40 lines
833 B
Haskell

{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Types.Auth where
import qualified Data.Text as T
import Servant.API
import Web.Internal.FormUrlEncoded
import Servant.HTML.Blaze
import GHC.Generics
data AuthReturn = AuthReturn
{ authReturnPass :: T.Text
, authReturnMethod :: Int
}
deriving (Show, Generic)
instance MimeRender HTML AuthReturn
instance FromForm AuthReturn
data AuthSubmitReturn = AuthSubmitReturn
{ authSubmitReturnComment :: T.Text
, authSubmitReturnPass :: T.Text
, authSubmitReturnMethod :: Int
}
deriving (Show, Generic)
instance MimeRender HTML AuthSubmitReturn
instance FromForm AuthSubmitReturn
newtype AuthDetailId = AuthDetailId
{ unId :: Int
}
deriving (Show, Generic)
instance MimeRender HTML AuthDetailId
instance FromForm AuthDetailId