fix: 管理员口令改为哈希并限制连续失败

This commit is contained in:
2026-11-16 02:35:15 +08:00
parent 77f80ad0e1
commit 0fbc3146d8
11 changed files with 209 additions and 26 deletions
+4 -1
View File
@@ -301,7 +301,10 @@ def put_users_study_settings(
@admin_router.get("/users/{employee_id}/credentials")
def get_credentials(employee_id: str, db: Session = Depends(get_db), _: str = Depends(require_admin)) -> dict:
def get_credentials(
employee_id: str, response: Response, db: Session = Depends(get_db), _: str = Depends(require_admin)
) -> dict:
response.headers["Cache-Control"] = "no-store"
return read_credentials(db, employee_id)