File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module Main where
88
99import Data.Aeson (ToJSON )
1010import Data.Proxy (Proxy (Proxy ))
11- import Data.Time (Day )
11+ import Data.Time (Day , fromGregorian )
1212import GHC.Generics (Generic )
1313import Network.Wai (Application )
1414import Network.Wai.Handler.Warp (run )
@@ -44,6 +44,24 @@ type UsersAPI =
4444 " users"
4545 :> (UsersIndex :<|> UsersShow )
4646
47+ users :: [User ]
48+ users =
49+ [ User
50+ { name = " Isaac Newton"
51+ , age = 372
52+ , email = " isaac@newton.co.uk"
53+ , username = " isaac"
54+ , registrationDate = fromGregorian 1683 3 1
55+ }
56+ , User
57+ { name = " Albert Einstein"
58+ , age = 136
59+ , email = " ae@mc2.org"
60+ , username = " albert"
61+ , registrationDate = fromGregorian 1905 12 1
62+ }
63+ ]
64+
4765usersIndex :: Handler [User ]
4866usersIndex = _
4967
You can’t perform that action at this time.
0 commit comments