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:
James Eversole
2024-11-05 15:18:21 -06:00
parent 13e8a11e83
commit 691e51660f
8 changed files with 137 additions and 48 deletions

View File

@@ -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