|
- import { FastifyInstance } from 'fastify';
- import * as git from './modules/git'
-
- export const addRoutes = (server: FastifyInstance) => {
- server.get('/', async (_, reply) => {
- reply.send({hello: 'world'})
- });
-
- const gitController = new git.GitControllerImpl()
- server.route({
- method: 'POST',
- url: '/repos',
- handler: gitController.createRepo,
- })
-
- server.route({
- method: 'DELETE',
- url: '/repos/:id',
- handler: gitController.deleteRepo,
- })
- }
|