feat: eigener benutzer per token abfragbar (/api/users/me)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
223eb4eb45
commit
db700fd003
2 files changed
+11
No files matched your search
@@ -13,6 +13,12 @@ class UserName(BaseModel):
|
||||
username: str
|
||||
|
||||
|
||||
@router.get("/me", response_model=UserName)
|
||||
def me(user: ApiUser) -> UserName:
|
||||
"""Who a token belongs to (e.g. so the agent only takes over its owner's clips)."""
|
||||
return UserName(id=user.id, username=user.username)
|
||||
|
||||
|
||||
@router.get("", response_model=list[UserName])
|
||||
def list_user_names(user: ApiUser, db: DbSession) -> list[UserName]:
|
||||
"""Names of the other active users, for sharing projects; nothing else is revealed."""
|
||||
|
||||
Reference in new issue
Block a user