Skip to content

Commit

Permalink
Haddocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fisx committed May 30, 2024
1 parent c263709 commit 83bbf0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/wire-subsystems/src/Wire/UserStore/Cassandra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ updateUserImpl uid update = runM $ runError do

-- TODO: error message should say: user not found? handle invalid? handle claimed or taken? any other bad thing happened? (look at the API)
-- TODO: why is this only calling claim? what is the difference between update and claim?

updateUserHandleImpl :: UserId -> StoredUserHandleUpdate -> Client (Either StoredUserUpdateError ())
updateUserHandleImpl uid update =
runM $ runError do
claimed <- embed $ claimHandleImpl uid update.old update.new
unless claimed $ throw StoredUserUpdateHandleExists

-- | Claim a new handle for an existing 'User'.
-- | Claim a new handle for an existing 'User': validate it, and in case of success, assign it
-- to user and mark it as taken.
claimHandleImpl :: UserId -> Maybe Handle -> Handle -> Client Bool
claimHandleImpl uid oldHandle newHandle =
isJust <$> do
Expand Down

0 comments on commit 83bbf0e

Please sign in to comment.