Skip to content
Permalink
Browse files

Add typed hole placeholders for usersShow and usersIndex

  • Loading branch information...
bradparker committed Oct 2, 2019
1 parent 12aa753 commit 0e5e7ad04819dc247e36a48da95dfb08e33e7e9c
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/Main.hs
@@ -17,6 +17,7 @@ import Servant
, (:>)
, Capture
, Get
, Handler
, JSON
, Server
, serve
@@ -43,8 +44,14 @@ type UsersAPI =
"users"
:> (UsersIndex :<|> UsersShow)

usersIndex :: Handler [User]
usersIndex = _

usersShow :: String -> Handler User
usersShow _uname = _

usersServer :: Server UsersAPI
usersServer = _usersIndex :<|> _usersShow
usersServer = usersIndex :<|> usersShow

usersApp :: Application
usersApp = serve (Proxy @UsersAPI) usersServer

0 comments on commit 0e5e7ad

Please sign in to comment.
You can’t perform that action at this time.