17 lines
386 B
JavaScript
17 lines
386 B
JavaScript
|
const router = require('express').Router();
|
||
|
const interestsRouter = require('./interests');
|
||
|
const usersRouter = require('./users');
|
||
|
module.exports = router;
|
||
|
|
||
|
|
||
|
const delay =
|
||
|
(ms = 1000) =>
|
||
|
(req, res, next) => {
|
||
|
setTimeout(next, ms);
|
||
|
};
|
||
|
|
||
|
|
||
|
router.use(delay());
|
||
|
router.use('/interests', interestsRouter);
|
||
|
router.use('/users', usersRouter);
|
||
|
router.use('/users/:id', usersRouter);
|