rvv041 #82

Merged
pitmutt merged 30 commits from rvv041 into milestone2 2024-06-07 20:03:06 +00:00
Showing only changes of commit 83cc1905ad - Show all commits

View file

@ -1503,5 +1503,15 @@ updateAdrsInAdrBook pool a i = do
set ab [AddressBookAddress =. val a]
where_ $ ab ^. AddressBookId ==. val i
-- | delete an existing address from AddressBook
deleteAdrsFromAB :: ConnectionPool -> AddressBookId -> IO ()
deleteAdrsFromAB pool i = do
pitmutt marked this conversation as resolved Outdated

If this function is intended to provide only one record, it should return a IO (Maybe (Entity AddressBook))

If this function is intended to provide only one record, it should return a `IO (Maybe (Entity AddressBook))`
runNoLoggingT $
PS.retryOnBusy $
flip PS.runSqlPool pool $ do
delete $ do
ab <- from $ table @AddressBook
where_ (ab ^. AddressBookId ==. val i)
rmdups :: Ord a => [a] -> [a]
rmdups = map head . group . sort