Skip to content

Commit

Permalink
Update trx commit error return
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
Aldiwildan77 and coderabbitai[bot] committed Dec 10, 2023
1 parent 978419f commit 063fbd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ func (r *donutRepository) UpdateStatusMatchMakerUsers(ctx context.Context, match
return
}

trx.Commit()
if err := trx.Commit(); err != nil {
return err
}
}()

for _, matchMakerUser := range matchMakerUsers {
Expand All @@ -75,6 +77,7 @@ func (r *donutRepository) UpdateStatusMatchMakerUsers(ctx context.Context, match

return nil
}
}

func (r *donutRepository) DeleteMatchMakerUsers(ctx context.Context, matchMakerUsers MatchMakerUserEntities) error {
return r.db.WithContext(ctx).Delete(MatchMakerUsers{}.FromEntities(matchMakerUsers)).Error
Expand Down

0 comments on commit 063fbd7

Please sign in to comment.