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

Rm validation flag #257

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Rm validation flag #257

merged 3 commits into from
Jan 9, 2025

Conversation

charmingduchess
Copy link
Collaborator

@charmingduchess charmingduchess commented Jan 9, 2025

Description

  • rm validation flag from patron creator service api request
  • rm hidden input that is based on the application state hasUsernameBeenValidated
  • move loading switch to the catch statement

Motivation and Context

Dupe accounts were slipping in due to a combination of the following:

  • scenario 1:
    • inline validation successful, saved in state
    • user posted their account
    • navigated back
    • submitted again, and state still has hasUsernameBeenValidated: true, so account is posted again, api does not revalidate, dupe patron created
  • scenario 2:
    • loading layer disappears before router.push to congrats page, allowing a validated username to be submitted again

How Has This Been Tested?

Manual testing. No additional unit tests created. Should there be some?

Checklist:

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nypl-library-card-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 5:06pm

@charmingduchess charmingduchess merged commit 73e7d64 into main Jan 9, 2025
5 checks 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.

2 participants