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 26 27 28 | 1x 1x 1x 1x 1x 1x 1x 1x 1x | import {asyncWrapper} from '@app/util/async-wrapper';
import {Router} from 'express';
import {parkCarController} from './park-car-controller';
import {
createValidationRouter,
} from '@app/validators';
import {body} from 'express-validator';
const parkCarRouter = Router({mergeParams: true});
parkCarRouter.put(
'/',
createValidationRouter(
'car:park',
[
body('latitude').exists().withMessage('latitude is missing')
.isLatitude(),
body('longitude').exists().withMessage('longitude is missing')
.isLongitude(),
],
'check location',
),
asyncWrapper(parkCarController),
);
export default parkCarRouter;
export * from './park-car-controller';
|