Get transcript summaries of Web videos.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
790 B

  1. import { FastifyInstance } from 'fastify';
  2. import { SummaryController, SummaryControllerImpl } from './modules/summary';
  3. export const addHealthRoutes = (server: FastifyInstance) => {
  4. server
  5. .route({
  6. method: 'GET',
  7. url: '/api/health/live',
  8. handler: async (_, reply) => {
  9. reply.send({ status: 'ok' });
  10. },
  11. })
  12. .route({
  13. method: 'GET',
  14. url: '/api/health/ready',
  15. handler: async (_, reply) => {
  16. reply.send({ status: 'ok' });
  17. },
  18. });
  19. }
  20. export const addSummaryRoutes = (server: FastifyInstance) => {
  21. const summaryController: SummaryController = new SummaryControllerImpl();
  22. server
  23. .route({
  24. method: 'POST',
  25. url: '/api/summary',
  26. handler: summaryController.summarizeVideoTranscript,
  27. });
  28. };