Paste server written in Haskell. Fork of Hpaste, fully freedom and privacy respecting and generally improved. At the time of writing there's an instance at <http://paste.rel4tion.org>.
Clone
HTTPS:
git clone https://vervis.peers.community/repos/aoqmo
SSH:
git clone USERNAME@vervis.peers.community:aoqmo
Branches
Tags
Reported.hs
{-# OPTIONS -Wall #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Reported page controller.
module Hpaste.Controller.Reported
(handle)
where
import Hpaste.Model.Report (getSomeReports,countReports)
import Hpaste.Controller.Admin (withAuth)
import Hpaste.Types
import Hpaste.View.Reported (page)
import Text.Blaze.Pagination
import Data.Pagination
import Snap.App
-- | List the reported pastes.
handle :: HPCtrl ()
handle =
withAuth $ \key -> do
pn <- getPagination "reported"
total <- model countReports
reports <- model $ getSomeReports (pnPn pn)
output $ page pn reports key
|