Commits

Luke Plant committed 3a29c90

Used withTransaction instead of commit

Comments (0)

Files changed (1)

src/Blog/Model.hs

                conn -> String -> String -> IO ()
 setPassword cn username password = do
   pwdHash <- makePasswordHash password
-  _ <- quickQuery' cn setPasswordForUsernameQuery [ toSql pwdHash
-                                                  , toSql username ]
-  commit cn
+  withTransaction cn (\cn ->
+                      run cn setPasswordForUsernameQuery [ toSql pwdHash
+                                                         , toSql username ]
+                     )
   return ()