2024-11-09 19:15:21 +03:00
|
|
|
const router = require('express').Router();
|
2024-12-07 13:43:07 +03:00
|
|
|
const listRouter = require('./list');
|
2024-12-14 13:03:47 +03:00
|
|
|
const keycloak = require('./keycloak');
|
2024-11-09 19:15:21 +03:00
|
|
|
module.exports = router;
|
2024-12-07 13:43:07 +03:00
|
|
|
|
|
|
|
const delay =
|
|
|
|
(ms = 1000) =>
|
|
|
|
(req, res, next) => {
|
|
|
|
setTimeout(next, ms);
|
|
|
|
};
|
|
|
|
|
2024-12-14 13:03:47 +03:00
|
|
|
router.use(keycloak.middleware());
|
2024-12-07 13:43:07 +03:00
|
|
|
router.use(delay());
|
|
|
|
router.use('/list', listRouter);
|