Initial Switch to V2. Completely Overhauled Backend, Frontend and General Structure.
This commit is contained in:
@@ -28,6 +28,16 @@ class MailListResponse(BaseModel):
|
||||
total: int
|
||||
|
||||
|
||||
@router.get("/latest-batch", response_model=dict)
|
||||
async def latest_comm_batch(
|
||||
ids: str = Query(..., description="Comma-separated customer IDs"),
|
||||
_user: TokenPayload = Depends(require_permission("crm", "view")),
|
||||
):
|
||||
"""Return the latest comm summary (id, type, occurred_at) keyed by customer_id."""
|
||||
customer_ids = [i.strip() for i in ids.split(",") if i.strip()]
|
||||
return await service.get_latest_comm_batch(customer_ids)
|
||||
|
||||
|
||||
@router.get("/all", response_model=CommListResponse)
|
||||
async def list_all_comms(
|
||||
type: Optional[str] = Query(None),
|
||||
|
||||
Reference in New Issue
Block a user