Skip to content

feat: allow re-adding ambassador as admin ➕#877

Merged
ramiAbdou merged 2 commits into
mainfrom
rami/ambassador
Sep 16, 2025
Merged

feat: allow re-adding ambassador as admin ➕#877
ramiAbdou merged 2 commits into
mainfrom
rami/ambassador

Conversation

@ramiAbdou
Copy link
Copy Markdown
Member

Description ✏️

This PR allows past ambassadors to be added as admins after they have already been archived.

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

@ramiAbdou ramiAbdou self-assigned this Sep 16, 2025
@ramiAbdou ramiAbdou marked this pull request as ready for review September 16, 2025 21:20
@ramiAbdou ramiAbdou merged commit 06c5e61 into main Sep 16, 2025
3 checks passed
@ramiAbdou ramiAbdou deleted the rami/ambassador branch September 16, 2025 21:21
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

lastName,
role,
});
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Admin Update Bug Causes Incorrect ID Handling

The addAdmin function returns a newly generated ID when an existing admin is updated via the onConflict clause, leading to an incorrect ID reference. This onConflict logic also overwrites firstName, lastName, and role for active admins, and it doesn't re-evaluate or update the memberId.

Fix in Cursor Fix in Web

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.

1 participant