Ali2206 commited on
Commit
ed623a2
·
1 Parent(s): 0f18196

Integrate TxAgent into CPS API: add TxAgent files, update requirements, fix imports and database collections

Browse files
Files changed (2) hide show
  1. api/__init__.py +1 -1
  2. api/routes/appointments.py +2 -1
api/__init__.py CHANGED
@@ -27,7 +27,7 @@ def get_router():
27
  router.include_router(patients, tags=["patients"]) # Remove prefix since routes already have /patients
28
  router.include_router(auth, prefix="/auth", tags=["auth"])
29
  router.include_router(pdf, prefix="/patients", tags=["pdf"]) # Keep prefix for PDF routes
30
- router.include_router(appointments, tags=["appointments"])
31
  router.include_router(messaging, tags=["messaging"])
32
  router.include_router(txagent, tags=["txagent"])
33
 
 
27
  router.include_router(patients, tags=["patients"]) # Remove prefix since routes already have /patients
28
  router.include_router(auth, prefix="/auth", tags=["auth"])
29
  router.include_router(pdf, prefix="/patients", tags=["pdf"]) # Keep prefix for PDF routes
30
+ router.include_router(appointments, prefix="/appointments", tags=["appointments"])
31
  router.include_router(messaging, tags=["messaging"])
32
  router.include_router(txagent, tags=["txagent"])
33
 
api/routes/appointments.py CHANGED
@@ -15,10 +15,11 @@ from models.schemas import (
15
 
16
  logger = logging.getLogger(__name__)
17
 
18
- router = APIRouter(prefix="/appointments", tags=["appointments"])
19
 
20
  # --- MAIN APPOINTMENTS ENDPOINT ---
21
 
 
22
  @router.get("/", response_model=AppointmentListResponse)
23
  async def get_appointments(
24
  page: int = Query(1, ge=1, description="Page number"),
 
15
 
16
  logger = logging.getLogger(__name__)
17
 
18
+ router = APIRouter(tags=["appointments"])
19
 
20
  # --- MAIN APPOINTMENTS ENDPOINT ---
21
 
22
+ @router.get("", response_model=AppointmentListResponse)
23
  @router.get("/", response_model=AppointmentListResponse)
24
  async def get_appointments(
25
  page: int = Query(1, ge=1, description="Page number"),