upgrades
All checks were successful
deploy / deploy (push) Successful in 1m10s

This commit is contained in:
2023-12-18 01:20:13 +03:00
parent 693d8b6aee
commit 7fa6fcf2d7
7 changed files with 72 additions and 44 deletions

View File

@@ -7,7 +7,7 @@ from services.db import local_session
from settings import AUTH_URL
async def check_auth(req) -> (bool, int | None):
async def check_auth(req):
token = req.headers.get("Authorization")
if token:
# Logging the authentication token
@@ -62,7 +62,7 @@ async def check_auth(req) -> (bool, int | None):
except Exception as e:
# Handling and logging exceptions during authentication check
print(f"[services.auth] {e}")
raise HTTPUnauthorized(message="Please, login first")
raise HTTPUnauthorized(text="Please, login first")
return False, None