Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: accept invite functionality should use transactions for atomicity #1306

Merged
merged 3 commits into from
Mar 1, 2025

Conversation

ztmbuilds
Copy link
Contributor

@ztmbuilds ztmbuilds commented Feb 28, 2025

Description

This PR addresses an issue in accepting invites. It wraps all database operations in a transaction making them atomic. Previously, multiple resources (invite, user, organisationUserRole) were being updated outside a transaction, which could lead to potential data inconsistencies

Related Issue

Fixes #1259

Type of Change

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation updates
  • style: Code style/formatting changes
  • refactor: Code refactoring
  • perf: Performance improvements
  • test: Test additions/updates
  • chore: Build process or tooling changes
  • ci: CI configuration changes
  • other:

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual tests

Test Evidence

Screenshot (76)
Screenshot (77)

Checklist

  • My code follows the project's coding style
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have included a screenshot showing all tests passing
  • I have included documentation screenshots (if applicable)

@Homoakin619 Homoakin619 closed this Mar 1, 2025
@Homoakin619 Homoakin619 reopened this Mar 1, 2025
@ztmbuilds ztmbuilds force-pushed the fix/invite-transaction branch from 46f4bec to 8778574 Compare March 1, 2025 13:30
@ztmbuilds ztmbuilds force-pushed the fix/invite-transaction branch from fcb4235 to de09e5a Compare March 1, 2025 13:40
@Homoakin619 Homoakin619 merged commit 2ca80c4 into hngprojects:dev Mar 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] Accept invite functionality should use transactions for atomicity
2 participants