This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user