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:
parent
b027125c2e
commit
4b7a8a7198
12 changed files with 91 additions and 0 deletions
12
src/Handler/Entries.hs
Normal file
12
src/Handler/Entries.hs
Normal 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")
|
Loading…
Add table
Add a link
Reference in a new issue