Selda schema for database

This commit is contained in:
2018-08-02 23:59:08 +03:00
parent 2e5e64feae
commit 9dc1a7dca2
6 changed files with 72 additions and 3 deletions

View File

@ -18,6 +18,11 @@ import Servant.HTML.Lucid (HTML)
import Lucid (HtmlT, ToHtml(..))
import qualified Lucid.Html5 as H
import Types
import Control.Monad.Logger
-- XXX: Temporary
import Database.Schema
import Database
data Index = Index
@ -41,4 +46,8 @@ instance ToHtml Index where
type API = Get '[HTML] Index
handler :: ServerT API AppM
handler = return Index
handler = do
u <- runDB $
query $ select $ gen users
$logInfo $ "users: " <> (pack . show $ u)
return Index