Refactor API to match database, no _uuid postfixes.

This commit is contained in:
2026-01-27 02:32:46 +00:00
parent 2fadaea19c
commit 3196aa7688
6 changed files with 17 additions and 36 deletions
+3 -3
View File
@@ -57,11 +57,11 @@ async def websocket_register_add(
f"The reset link for {passkey.instance.rp_name} is invalid or has expired"
)
s = await get_reset(reset)
user_uuid = s.user_uuid
user_uuid = s.user
else:
# Require recent authentication for adding a new passkey
ctx = await authz.verify(auth, perm=[], host=host, max_age="5m")
user_uuid = ctx.session.user_uuid
user_uuid = ctx.session.user
s = ctx.session
# Get user information and determine effective user_name for this registration
@@ -113,7 +113,7 @@ async def websocket_authenticate(ws: WebSocket, auth=AUTH_COOKIE):
if auth:
try:
session = await get_session(auth, host=host)
session_user_uuid = session.user_uuid
session_user_uuid = session.user
credentials = db.get_credentials_by_user_uuid(session_user_uuid)
credential_ids = (
[c.credential_id for c in credentials] if credentials else None