Refactor password handling and model typing
Replaced custom password generation and verification logic with a new pkg/password.py module using Argon2 for secure hashing. Updated model field types to use PEP 604 union syntax (e.g., str | None) and improved type annotations. Refactored admin and session routes to use new password utilities and direct model methods for CRUD operations. Removed legacy tool-based password functions and cleaned up .idea project files.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
class Item(BaseModel):
|
||||
id: int
|
||||
@@ -9,8 +8,7 @@ class Item(BaseModel):
|
||||
icon: str
|
||||
status: str
|
||||
phone: int
|
||||
lost_description: Optional[str]
|
||||
find_ip: Optional[str]
|
||||
lost_description: str | None
|
||||
find_ip: str | None
|
||||
create_time: str
|
||||
lost_time: Optional[str]
|
||||
|
||||
lost_time: str | None
|
||||
|
||||
Reference in New Issue
Block a user