Reintroduce Debugging database handler; update main to allow for environment definition that will branch between all debug handlers or real effect handlers
This commit is contained in:
@@ -27,8 +27,8 @@ rootHandler = (writeLog Info "Hit the root!")
|
||||
userListHandler :: CRUD es
|
||||
=> Eff es (Html ())
|
||||
userListHandler = do
|
||||
writeLog Info "Selected all users!"
|
||||
users <- databaseRead_ "SELECT id, name FROM users"
|
||||
writeLog Info "Selected all users!"
|
||||
return $ V.baseDoc $ case users of
|
||||
[] -> warning "No users found"
|
||||
_ -> foldMap userHtml users
|
||||
|
||||
Reference in New Issue
Block a user