|
- import { FastifyInstance } from 'fastify';
- import { SummaryController, SummaryControllerImpl } from './modules/summary';
-
- export const addHealthRoutes = (server: FastifyInstance) => {
- server
- .route({
- method: 'GET',
- url: '/api/health/live',
- handler: async (_, reply) => {
- reply.send({ status: 'ok' });
- },
- })
- .route({
- method: 'GET',
- url: '/api/health/ready',
- handler: async (_, reply) => {
- reply.send({ status: 'ok' });
- },
- });
- }
-
- export const addSummaryRoutes = (server: FastifyInstance) => {
- const summaryController: SummaryController = new SummaryControllerImpl();
- server
- .route({
- method: 'POST',
- url: '/api/summary',
- handler: summaryController.summarizeVideoTranscript,
- });
- };
|