Refactor code structure and remove redundant sections for improved readability and maintainability

This commit is contained in:
2025-06-11 18:48:20 -03:00
parent 2f6eb4f6c1
commit f9c1ece4f0
6 changed files with 4 additions and 4 deletions

21
backend/routes.ts Normal file
View File

@@ -0,0 +1,21 @@
import { Router } from 'express';
import multer from 'multer';
import OrphanagesController from './src/controllers/OrphanagesController';
import UploadConfig from './src/config/upload';
const routes = Router();
const upload = multer(UploadConfig);
routes.get('/users', (request, response) => {
return response.json({message: ["João"]});
});
routes.post('/orphanages', upload.array('images'), OrphanagesController.create);
routes.get('/orphanages', OrphanagesController.getAll);
routes.get('/orphanages/:id', OrphanagesController.getIndex);
export default routes;