2019-09-08 00:37:50 +00:00
|
|
|
{-# LANGUAGE DataKinds #-}
|
|
|
|
{-# LANGUAGE TypeOperators #-}
|
|
|
|
{-# LANGUAGE DeriveGeneric #-}
|
|
|
|
{-# LANGUAGE FlexibleInstances #-}
|
|
|
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
|
|
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
{-# LANGUAGE RankNTypes #-}
|
|
|
|
{-# LANGUAGE ScopedTypeVariables #-}
|
|
|
|
|
|
|
|
module API where
|
|
|
|
|
|
|
|
import Servant.API
|
|
|
|
import Servant.RawM
|
|
|
|
import Servant.HTML.Blaze
|
|
|
|
|
|
|
|
-- internal imports
|
|
|
|
|
|
|
|
import Types
|
|
|
|
import View
|
|
|
|
|
|
|
|
type UserAPI =
|
|
|
|
"auth" :> Get '[HTML] AuthPage
|
2019-09-08 10:48:57 +00:00
|
|
|
|
|
|
|
:<|> "user" :> Capture "id" Int :> Get '[HTML] UserPage
|