(20250122) Started making a cron script for work reminders. Modifying the mail module to work with it.

This commit is contained in:
2025-01-22 16:22:22 +05:30
parent 61ad76301d
commit 154a9c3e95
4 changed files with 519 additions and 1 deletions
+4 -1
View File
@@ -219,7 +219,10 @@ async def send_one_mail(
# ┛┗┗┻┗┛┗ ┗┛┛┗┗ ┗┛┗
# If the session token is invalid/expired:
if kwargs.get("session_info") is None:
if (
kwargs.get("session_info") is None and
inbound_headers["Remote-IP"] not in current_app.whitelisted_ips
):
return ResponseModel(
status_code = StatusCodes.FAILED,
http_code = HttpCodes.UNAUTHORIZED