feat: add Twilio SMS/call integration with settings, templates, and conversation history
This commit is contained in:
@@ -374,4 +374,17 @@ router.get(
|
||||
}
|
||||
);
|
||||
|
||||
// GET /api/patients/:id/communications
|
||||
router.get("/:id/communications", async (req: Request, res: Response): Promise<any> => {
|
||||
try {
|
||||
const patientId = parseInt(req.params.id);
|
||||
if (isNaN(patientId)) return res.status(400).json({ message: "Invalid patient ID" });
|
||||
|
||||
const communications = await storage.getCommunicationsByPatient(patientId);
|
||||
return res.status(200).json(communications);
|
||||
} catch (err) {
|
||||
return res.status(500).json({ error: "Failed to fetch communications", details: String(err) });
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user