Skip to content

Commit 01497d8

Browse files
committed
Fix backend error
1 parent f83dcaf commit 01497d8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/routes/account.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def login(request: Request, login_request: LoginRequest, db: Session = Depends(g
8080
username=username,
8181
ip=client_ip,
8282
user_agent=raw_ua or "Unknown",
83-
action="login",
83+
action_type="login",
8484
)
8585
raise HTTPException(
8686
status_code=403,
@@ -196,7 +196,7 @@ def register(request: Request, register_request: RegisterRequest, db: Session =
196196
username=username,
197197
ip=client_ip,
198198
user_agent=raw_ua or "Unknown",
199-
action="registration",
199+
action_type="registration",
200200
)
201201
raise HTTPException(
202202
status_code=403,

backend/security/audit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _render_security(action: str, fields: Dict[str, Any]) -> List[str]:
190190
lines.append(f"Total entries: {total}")
191191
return lines
192192
if action == "blocked_user_agent":
193-
action_type = fields.get("action", "access")
193+
action_type = fields.get("action_type", "access")
194194
lines = [f"Blocked user agent attempted {action_type}"]
195195
if fields.get("username"):
196196
lines.append(f"Username: {fields['username']}")

0 commit comments

Comments
 (0)