Browse Source

Restrict snapshots to fpcomplete-only

tags/dead/2015-03-18-new-upload
Chris Done 7 years ago
parent
commit
a913a7dcd4
  1. 4
      DevelMain.hs
  2. 3
      Handler/Home.hs

4
DevelMain.hs

@ -28,9 +28,9 @@ main =
tid <- forkIO
(runSettings
(setPort port defaultSettings)
(\req ->
(\req cont ->
do handler <- readIORef ref
handler req))
handler req cont))
_ <- newStore tid
ref' <- newStore ref
_ <- newStore c

3
Handler/Home.hs

@ -1,8 +1,8 @@
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home where
import Import
import qualified Database.Esqueleto as E
import Import
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
@ -16,6 +16,7 @@ getHomeR = do
stackages <- runDB $ E.select $ E.from $ \(stackage `E.InnerJoin` user) -> do
E.on (stackage E.^. StackageUser E.==. user E.^. UserId)
E.orderBy [E.desc $ stackage E.^. StackageUploaded]
E.where_ (E.like (user E.^. UserDisplay) (E.val "%@fpcomplete.com"))
return
( stackage E.^. StackageIdent
, stackage E.^. StackageTitle

Loading…
Cancel
Save