|
12345678910111213141516171819202122232425262728293031323334 |
- import { FastifyInstance } from 'fastify';
- import { InitController, InitControllerImpl } from './modules/init/InitController';
-
- export const addDefaultRoutes = (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: 'ready',
- });
- },
- });
- };
-
- export const addInitRoutes = (server: FastifyInstance) => {
- const initController: InitController = new InitControllerImpl();
- server
- .route({
- method: 'POST',
- url: '/api/download',
- handler: initController.downloadDataset,
- });
- };
|