precommit

This commit is contained in:
2024-02-04 07:58:44 +03:00
parent 537b89dbaf
commit b98da839ed
10 changed files with 64 additions and 31 deletions

View File

@@ -10,6 +10,7 @@ import logging
logger = logging.getLogger("\t[services.auth]\t")
logger.setLevel(logging.DEBUG)
async def check_auth(req) -> str | None:
token = req.headers.get("Authorization")
user_id = ""
@@ -49,6 +50,7 @@ async def check_auth(req) -> str | None:
return user_id
except Exception as e:
import traceback
traceback.print_exc()
# Handling and logging exceptions during authentication check
print(f"[services.auth] Error {e}")