mirror of
https://github.com/dotFionn/iassure-wx.git
synced 2026-03-16 12:32:56 -05:00
change license, restructure
This commit is contained in:
17
src/backend/router.ts
Normal file
17
src/backend/router.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Request, Response, Router } from 'express';
|
||||
|
||||
import regionController from './controllers/region.controller';
|
||||
import wxController from './controllers/wx.controller';
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get('/regions', regionController.getRegions);
|
||||
router.get('/regions/:region', regionController.getRegion);
|
||||
router.get('/regions/:region/wx', wxController.getRegionWx);
|
||||
|
||||
router.use((req: Request, res: Response) => {
|
||||
// 404
|
||||
res.status(404).json({ msg: 'the requested resource could not be found' });
|
||||
});
|
||||
|
||||
export default { router };
|
||||
Reference in New Issue
Block a user