2023-07-09 16:42:44 -07:00
|
|
|
from fastapi import APIRouter, Depends
|
2023-07-06 16:44:38 -07:00
|
|
|
from .jobs import router as jobs_router
|
2023-07-09 16:42:44 -07:00
|
|
|
from api.auth.auth_utils import get_active_current_user
|
2023-08-19 18:31:10 -07:00
|
|
|
from settings import AUTH_REQUIRED
|
|
|
|
|
|
|
|
if AUTH_REQUIRED:
|
|
|
|
router = APIRouter(prefix="/v1", dependencies=[Depends(get_active_current_user)])
|
|
|
|
else:
|
|
|
|
router = APIRouter(prefix="/v1")
|
2023-07-06 16:44:38 -07:00
|
|
|
|
|
|
|
router.include_router(jobs_router)
|