Spaces:
Sleeping
Sleeping
Update api/routes/auth.py
Browse files- api/routes/auth.py +3 -0
api/routes/auth.py
CHANGED
|
@@ -151,6 +151,9 @@ async def get_me(request: Request, current_user: dict = Depends(get_current_user
|
|
| 151 |
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
| 152 |
detail=f"Database error: {str(e)}"
|
| 153 |
)
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
# Export the router as 'auth' for api.__init__.py
|
| 156 |
auth = router
|
|
|
|
| 151 |
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
| 152 |
detail=f"Database error: {str(e)}"
|
| 153 |
)
|
| 154 |
+
@router.get("/test-auth")
|
| 155 |
+
async def test_token_auth(current_user: dict = Depends(get_current_user)):
|
| 156 |
+
return {"status": "ok", "email": current_user.get("email")}
|
| 157 |
|
| 158 |
# Export the router as 'auth' for api.__init__.py
|
| 159 |
auth = router
|