adds health check and new env logic

This commit is contained in:
msramalho
2024-10-17 13:09:50 +01:00
parent 1a3273da7e
commit f2a14abb17
5 changed files with 31 additions and 3 deletions

View File

@@ -26,6 +26,10 @@ async def home(request: Request):
return JSONResponse(status)
@default_router.get("/health")
async def health(request: Request):
return JSONResponse({"status": "ok"})
@default_router.get("/groups", response_model=list[str])
def get_user_groups(db: Session = Depends(get_db), email=Depends(get_user_auth)):
return crud.get_user_groups(db, email)