Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import {createValidationRouter} from '@app/validators';
import {Router} from 'express';
import driveCarRouter from './drive';
import parkCarRouter from './park';
import {param} from 'express-validator';
import deleteCarRouter from './delete';
const carCarIdRouter = Router({mergeParams: true});
carCarIdRouter.use(
createValidationRouter(
'car:carId',
param('carId')
.exists().withMessage('carId is missing')
.isNumeric().withMessage('carId has to be a number'),
'check carId',
),
);
carCarIdRouter.delete('/', deleteCarRouter);
carCarIdRouter.use('/drive', driveCarRouter);
carCarIdRouter.use('/park', parkCarRouter);
export default carCarIdRouter;
export * from './drive';
|