Fix backend bugs: password hash column rename, dynamic import, AuditLog response_model, websocket reference, missing exports, bcrypt version pin

This commit is contained in:
2026-07-18 05:14:37 +00:00
parent 86c12376f8
commit 312ac27f88
8 changed files with 87 additions and 80 deletions
+9 -2
View File
@@ -184,7 +184,7 @@ async def list_logs(
]
@router.post("/audit", response_model=AuditLog)
@router.post("/audit", response_model=dict)
async def log_audit(
action_type: str,
target_user_id: Optional[int] = None,
@@ -210,4 +210,11 @@ async def log_audit(
db.add(new_audit)
await db.flush()
return AuditLog.model_validate(new_audit)
return {
"id": new_audit.id,
"admin_id": new_audit.admin_id,
"action_type": new_audit.action_type,
"target_user_id": new_audit.target_user_id,
"details": new_audit.details,
"timestamp": new_audit.timestamp,
}