Skip to content
Snippets Groups Projects
routes.ts 1.03 KiB
Newer Older
import { Request, Response, Router } from 'express';
import SheetController from './Controllers/SheetController';
import CalculatorController from './Controllers/CalculatorController';
import ParameterController from './Controllers/ParameterController';
Ramiro's avatar
Ramiro committed
import FAQController from './Controllers/FAQController';
import UserController from './Controllers/UserController';
Renzo Beux's avatar
Renzo Beux committed
import AuditorController from './Controllers/AuditorController';
import authChecker from './Middlewares/authChecker';

const router = Router();

router.get('/', (req: Request, res: Response): void => {
  res.send('Hey! This is REPP API, you can go to /api-docs to learn more!');
});

router.use('/users', UserController);
// From this line on a auth verification will be taken
Renzo Beux's avatar
Renzo Beux committed
router.use(authChecker);
router.use('/sheetParser', SheetController);

router.use('/repCalculator', CalculatorController);

router.use('/parameters', ParameterController);
Ramiro's avatar
Ramiro committed
router.use('/faqs', FAQController);
router.use('/auditory', AuditorController);
Ramiro's avatar
Ramiro committed