Skip to content

Commit c1572e1

Browse files
committed
Merge branch 'add/fastapi-users-addition' of https://github.com/transformerlab/transformerlab-api into add/fastapi-users-addition
2 parents f29275e + 29f6567 commit c1572e1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

transformerlab/routers/auth2.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,16 @@ async def refresh_access_token(
8686

8787
except JWTError:
8888
raise HTTPException(status_code=401, detail="Expired or invalid refresh token")
89+
90+
91+
@router.get("/users/me/teams")
92+
async def get_user_teams(user: User = Depends(current_active_user)):
93+
# Placeholder implementation
94+
# In a real application, fetch teams from the database
95+
return {
96+
"user_id": user.id,
97+
"teams": [
98+
{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Transformer Lab"},
99+
{"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "name": "Team 2"},
100+
],
101+
}

0 commit comments

Comments
 (0)