mirror of
https://github.com/jlengrand/sample-node-api.git
synced 2026-03-10 08:41:23 +00:00
12 lines
328 B
JavaScript
12 lines
328 B
JavaScript
const express = require('express');
|
|
const router = express.Router({ mergeParams: true });
|
|
|
|
const accountsCarsController = require('../controllers/accountsCars.controller');
|
|
|
|
router.route('/cars')
|
|
.get(accountsCarsController.getAll);
|
|
|
|
router.route('/cars/:_id')
|
|
.get(accountsCarsController.get);
|
|
|
|
module.exports = router; |