Skip to content

Commit

Permalink
Put email in data field (#1766)
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanTrem authored Jan 7, 2025
1 parent 646cd2d commit e2c1804
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions py/core/main/api/v3/users_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,8 @@ async def verify_email(
from r2r import R2RClient
client = R2RClient()
tokens = client.users.verify_email(
tokens = client.users.send_verification_email(
email="jane.doe@example.com",
verification_code="1lklwal!awdclm"
)"""
),
},
Expand All @@ -352,9 +351,8 @@ async def verify_email(
const client = new r2rClient();
function main() {
const response = await client.users.verifyEmail({
const response = await client.users.sendVerificationEmail({
email: jane.doe@example.com",
verificationCode: "1lklwal!awdclm"
});
}
Expand All @@ -366,9 +364,9 @@ async def verify_email(
"lang": "cURL",
"source": textwrap.dedent(
"""
curl -X POST "https://api.example.com/v3/users/login" \\
curl -X POST "https://api.example.com/v3/users/send-verification-email" \\
-H "Content-Type: application/x-www-form-urlencoded" \\
-d "email=jane.doe@example.com&verification_code=1lklwal!awdclm"
-d "email=jane.doe@example.com"
"""
),
},
Expand All @@ -391,9 +389,7 @@ async def send_verification_email(
message="This email is already verified. Please log in.",
)

result = await self.services.auth.send_verification_email(
email=email
)
await self.services.auth.send_verification_email(email=email)
return GenericMessageResponse(message="A verification email has been sent.") # type: ignore

@self.router.post(
Expand Down

0 comments on commit e2c1804

Please sign in to comment.