fix: 管理员口令改为哈希并限制连续失败
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user