Begin adding rudimentary support for posting new entries to the site - needs to be prettier and a lot smarter, but it exists now

This commit is contained in:
Danielle McLean 2017-10-08 16:51:48 +11:00
parent b027125c2e
commit 4b7a8a7198
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
12 changed files with 91 additions and 0 deletions

12
src/Handler/Entries.hs Normal file
View file

@ -0,0 +1,12 @@
{-# LANGUAGE TemplateHaskell #-}
module Handler.Entries where
import Import
import qualified Entry.Kind as K
import Widget.Feed ( hFeed )
getEntriesR :: K.EntryKind -> Handler Html
getEntriesR kind = do
entries <- runDB $ selectList [EntryKind ==. kind] [Desc EntryPublished]
defaultLayout $(widgetFile "entries")