Skip to content

Commit 552b0a7

Browse files
Merge pull request #3 from Devotel/patch/fix-email-endpoint-path
fix(email): correct endpoint path
2 parents 40fca29 + 7b9692f commit 552b0a7

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/devo_global_comms_python/models/email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class EmailSendRequest(BaseModel):
99
"""
1010
Request model for email send API.
1111
12-
Used for POST /user-api/email/send
12+
Used for POST /api/v1/user-api/email/send
1313
"""
1414

1515
subject: str = Field(..., description="Email subject")
@@ -23,7 +23,7 @@ class EmailSendResponse(BaseModel):
2323
"""
2424
Response model for email send API.
2525
26-
Returned from POST /user-api/email/send
26+
Returned from POST /api/v1/user-api/email/send
2727
"""
2828

2929
success: bool = Field(..., description="Whether the email was sent successfully")

src/devo_global_comms_python/resources/email.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def send_email(
5555
}
5656

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

6060
from ..models.email import EmailSendResponse
6161

tests/test_email.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_send_email_success(self, email_resource):
4040

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

129129
# Verify the request was made with special characters
130130
email_resource.client.post.assert_called_once_with(
131-
"email/send",
131+
"user-api/email/send",
132132
json={
133133
"subject": special_subject,
134134
"body": special_body,
@@ -165,7 +165,7 @@ def test_send_email_long_content(self, email_resource):
165165
)
166166

167167
email_resource.client.post.assert_called_once_with(
168-
"email/send",
168+
"user-api/email/send",
169169
json={
170170
"subject": long_subject,
171171
"body": long_body,
@@ -259,7 +259,7 @@ def test_send_email_unicode_content(self, email_resource):
259259
)
260260

261261
email_resource.client.post.assert_called_once_with(
262-
"email/send",
262+
"user-api/email/send",
263263
json={
264264
"subject": unicode_subject,
265265
"body": unicode_body,

0 commit comments

Comments
 (0)