Skip to content

Commit

Permalink
Fix incorrect HTTP return codes
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Aug 4, 2021
1 parent 1b210fb commit e902477
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Change Log
- Remove print statements.

0.1.9 (07/19/2021)
-------------------
------------------
- Allow users to add multiple recipients while sending email.
- Add CC and BCC options.
- Check if attachment file is available before trying to attach.
Expand All @@ -37,15 +37,19 @@ Change Log
- Fix version number format.

0.2.0 (07/22/2021)
-------------------
------------------
- Return a dictionary element after sending an email/SMS.
- Add status code and description to return dict.
- Update docs and CHANGELOG
- Bump version.

0.2.1 (07/24/2021)
-------------------
------------------
- Remove logger module.
- Add exception handlers for Messenger class.
- Update docs and CHANGELOG
- Bump version.
- Bump version.

0.2.2 (08/02/2021)
------------------
- Fix incorrect HTTP return codes
2 changes: 1 addition & 1 deletion gmailconnector/read_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def read_email(self) -> dict or None:
'\t3. If you have enabled 2 factor authentication, use thee App Password generated.'
return {
'ok': False,
'status': 200,
'status': 401,
'body': return_msg
}

Expand Down
2 changes: 1 addition & 1 deletion gmailconnector/send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def send_email(self) -> dict:
"Ensure the credentials stored in env vars are set correct.\n"
return {
'ok': False,
'status': 403,
'status': 401,
'body': return_msg
}
except SMTPConnectError:
Expand Down
2 changes: 1 addition & 1 deletion gmailconnector/send_sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def send_sms(self) -> dict:
"Ensure the credentials stored in env vars are set correct.\n"
return {
'ok': False,
'status': 403,
'status': 401,
'body': return_msg
}
except SMTPConnectError:
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version_info = (0, 2, 1)
version_info = (0, 2, 2)

0 comments on commit e902477

Please sign in to comment.