Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/devo_global_comms_python/models/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class EmailSendRequest(BaseModel):
"""
Request model for email send API.

Used for POST /user-api/email/send
Used for POST /api/v1/user-api/email/send
"""

subject: str = Field(..., description="Email subject")
Expand All @@ -23,7 +23,7 @@ class EmailSendResponse(BaseModel):
"""
Response model for email send API.

Returned from POST /user-api/email/send
Returned from POST /api/v1/user-api/email/send
"""

success: bool = Field(..., description="Whether the email was sent successfully")
Expand Down
2 changes: 1 addition & 1 deletion src/devo_global_comms_python/resources/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def send_email(
}

# Send request to the exact endpoint
response = self.client.post("email/send", json=data)
response = self.client.post("user-api/email/send", json=data)

from ..models.email import EmailSendResponse

Expand Down
8 changes: 4 additions & 4 deletions tests/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_send_email_success(self, email_resource):

# Verify the request was made correctly
email_resource.client.post.assert_called_once_with(
"email/send",
"user-api/email/send",
json={
"subject": "Hello World!",
"body": "This is a test email!",
Expand Down Expand Up @@ -128,7 +128,7 @@ def test_send_email_with_special_characters(self, email_resource):

# Verify the request was made with special characters
email_resource.client.post.assert_called_once_with(
"email/send",
"user-api/email/send",
json={
"subject": special_subject,
"body": special_body,
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_send_email_long_content(self, email_resource):
)

email_resource.client.post.assert_called_once_with(
"email/send",
"user-api/email/send",
json={
"subject": long_subject,
"body": long_body,
Expand Down Expand Up @@ -259,7 +259,7 @@ def test_send_email_unicode_content(self, email_resource):
)

email_resource.client.post.assert_called_once_with(
"email/send",
"user-api/email/send",
json={
"subject": unicode_subject,
"body": unicode_body,
Expand Down
Loading