blob: d8604ac70116db1bca142160b685102ac08833d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# LANGUAGE OverloadedStrings #-}
module Controller.User
( getUsers
) where
import Web.Scotty
import Control.Monad.IO.Class (liftIO)
import qualified Secure
import Model.Database
import qualified Model.User as User
getUsers :: ActionM ()
getUsers =
Secure.loggedAction (\_ ->
(liftIO $ map User.getJsonUser <$> runDb User.list) >>= json
)
|