personal_website/routes/api/apiRouter.ts
2024-09-23 23:24:59 +02:00

15 lines
525 B
TypeScript

import express, { type Request, type Response } from "express";
import checkAuthenticated from 'miscellaneous/checkAuthenticated';
import mediaRouter from 'routes/api/mediaRouter';
import cashTransactionRouter from 'routes/api/cashTransactionRouter';
const router = express.Router();
router.use('/media', mediaRouter);
router.use('/cash', checkAuthenticated, cashTransactionRouter);
router.get('/', function (req: Request, res: Response) {
res.status(200).json({ message: 'API is working' });
});
export default router;