Ali2206 commited on
Commit
c242aea
·
verified ·
1 Parent(s): 8795c52

Update api/routes/auth.py

Browse files
Files changed (1) hide show
  1. 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