refactoring-backend #3

Merged
lukas.pupkalipinski merged 403 commits from refactoring-backend into main 2026-05-20 20:23:46 +02:00
Showing only changes of commit 5379cca238 - Show all commits

View File

@@ -7,8 +7,6 @@ survive server restarts.
from __future__ import annotations
import asyncio
from app.utils.async_utils import run_blocking
import hashlib
import hmac
import secrets
@@ -17,6 +15,8 @@ from typing import TYPE_CHECKING
import bcrypt
import structlog
from app.utils.async_utils import run_blocking
if TYPE_CHECKING:
import aiosqlite
@@ -72,7 +72,6 @@ async def _check_password(plain: str, hashed: str) -> bool:
"""
plain_bytes = plain.encode()
hashed_bytes = hashed.encode()
loop = asyncio.get_running_loop()
return await run_blocking(lambda: bool(bcrypt.checkpw(plain_bytes, hashed_bytes)))