bugfix
This commit is contained in:
parent
9ab529e930
commit
166e8c2273
@ -1,12 +0,0 @@
|
|||||||
from ahserver.serverenv import get_user
|
|
||||||
|
|
||||||
async def get_current_user_id() -> str:
|
|
||||||
"""Get the current user ID from ahserver context."""
|
|
||||||
try:
|
|
||||||
# Use ahserver's built-in get_user() function
|
|
||||||
user_id = await get_user()
|
|
||||||
return user_id
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Warning: Could not get current user ID: {e}")
|
|
||||||
# Fallback to a safe default
|
|
||||||
return "default_user"
|
|
||||||
Loading…
x
Reference in New Issue
Block a user