Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pip install -e ".[dev]"
4. To override default environment variables, add a file called `.env` to the `comet-api` directory and update as needed (optional):

```
API_PREFIX=[SOME_ROUTE] # Ex: '/api'
DATABASE_URL=[SOME_URL] # Ex: 'postgresql://username:password@localhost:5432/database_name'
OIDC_CONFIG_URL=[SOME_URL] # Ex: 'https://token.actions.githubusercontent.com/.well-known/openid-configuration'
```
Expand Down
3 changes: 2 additions & 1 deletion app/admin/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from starlette import status

from app.auth import validate_jwt
from app.config import settings

router = APIRouter(
prefix="/admin",
prefix=f"{settings.API_PREFIX}/admin",
tags=["Admin"],
)

Expand Down
3 changes: 2 additions & 1 deletion app/applicants/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
ApplicantResponse,
ApplicantUpdate,
)
from app.config import settings
from app.db import get_db

router = APIRouter(
prefix="/applicants",
prefix=f"{settings.API_PREFIX}/applicants",
tags=["Applicants"],
responses={404: {"description": "Endpoint not found"}},
)
Expand Down
3 changes: 2 additions & 1 deletion app/cases/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
CaseUpdate,
CaseWithApplicant,
)
from app.config import settings
from app.db import get_db

router = APIRouter(
prefix="/cases",
prefix=f"{settings.API_PREFIX}/cases",
tags=["Cases"],
responses={404: {"description": "Endpoint not found"}},
)
Expand Down
1 change: 1 addition & 0 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env")

API_PREFIX: str = ""
DATABASE_URL: str = "sqlite:///./db.sqlite3"
OIDC_CONFIG_URL: str | None = None

Expand Down
4 changes: 3 additions & 1 deletion app/health/router.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from fastapi import APIRouter
from starlette import status

from app.config import settings

router = APIRouter(
prefix="/health",
prefix=f"{settings.API_PREFIX}/health",
tags=["Health"],
)

Expand Down
3 changes: 2 additions & 1 deletion app/users/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
from starlette import status

import app.users.services as service
from app.config import settings
from app.db import get_db
from app.users.schemas import UserCreate, UserListResponse, UserResponse, UserUpdate

router = APIRouter(
prefix="/users",
prefix=f"{settings.API_PREFIX}/users",
tags=["Users"],
responses={404: {"description": "Endpoint not found"}},
)
Expand Down