完成了config文件,初步修正了model的一些问题
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from .user import User
|
||||
from .auth import get_password_hash, verify_password
|
||||
from .database import init_db
|
||||
|
||||
__all__ = ["User", "get_password_hash", "verify_password", "init_db"]
|
||||
__all__ = ["User", "init_db"]
|
||||
|
@@ -1,11 +0,0 @@
|
||||
from passlib.context import CryptContext
|
||||
|
||||
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
||||
|
||||
def get_password_hash(password: str) -> str:
|
||||
"""Generate password hash using bcrypt"""
|
||||
return pwd_context.hash(password)
|
||||
|
||||
def verify_password(plain_password: str, hashed_password: str) -> bool:
|
||||
"""Verify password against stored hash"""
|
||||
return pwd_context.verify(plain_password, hashed_password)
|
Reference in New Issue
Block a user