{-# LANGUAGE TypeOperators          #-}

module Zero.Account.Server
  (
    accountViewServer
  , accountServer
  ) where

import           Servant (Server)
import           Servant.API
import           Zero.Persistence
import           Zero.Account.API
import           Zero.Index.Handlers (index)
import           Zero.Account.Handlers (getAccountStatus)
import           Zero.Account.Profile.Handlers
import           Zero.SessionToken.Internal (SessionToken)
import           Zero.SessionToken.Server
import           Zero.ContentTypes

------------------------------------------------------------------------------

accountViewServer :: SessionId -> Connection -> Server AccountViewAPI
accountViewServer sid conn =
       index
  :<|> profile

accountServer :: SessionId -> Connection -> Server AccountAPI
accountServer sid conn =
  getAccountStatus sid conn

