aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/api/users.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/api/users.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/api/users.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/api/users.py b/packages/meshbay-hub/src/meshbay_hub/api/users.py
index f91b381..2c2eede 100644
--- a/packages/meshbay-hub/src/meshbay_hub/api/users.py
+++ b/packages/meshbay-hub/src/meshbay_hub/api/users.py
@@ -236,6 +236,18 @@ async def token_refresh(
}
+@router.get("/me")
+async def get_current_user_info(
+ current_user: User = Depends(get_current_user),
+):
+ return {
+ "user_id": current_user.id,
+ "username": current_user.username,
+ "role": current_user.role,
+ "status": current_user.status,
+ }
+
+
@router.get("/{username}/pubkeys")
async def get_user_pubkeys(
username: str,