Skip to content

fix(user/avatar): return email_verified after toggle#1007

Merged
moshfeu merged 3 commits intomasterfrom
fix/redirect-after-avatar-toggle
Feb 28, 2026
Merged

fix(user/avatar): return email_verified after toggle#1007
moshfeu merged 3 commits intomasterfrom
fix/redirect-after-avatar-toggle

Conversation

@moshfeu
Copy link
Copy Markdown
Member

@moshfeu moshfeu commented Feb 28, 2026

No description provided.

@moshfeu moshfeu changed the title fix(user/avatar): return email_verified after toggle) fix(user/avatar): return email_verified after toggle Feb 28, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR ensures the user avatar toggle endpoint returns email_verified in its response payload, keeping it consistent with other user-related responses.

Changes:

  • Add email_verified to the toggleAvatar success response (sourced from the auth context).
  • Improve error handling in toggleAvatar to safely stringify non-Error throws.
  • Add a focused Jest test suite for the toggleAvatarHandler and wire function tests into the main yarn test script.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
package.json Adds a test:functions Jest script and runs it as part of yarn test.
netlify/functions-src/functions/modules/users/toggleAvatar.ts Includes email_verified in the response and hardens catch-block message extraction.
netlify/functions-src/functions/modules/users/toggleAvatar.test.ts Adds unit tests verifying email_verified behavior in the handler response.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@moshfeu moshfeu merged commit 8d45144 into master Feb 28, 2026
9 checks passed
@moshfeu moshfeu deleted the fix/redirect-after-avatar-toggle branch February 28, 2026 22:30
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