kfu-24-teacher/stubs/api/index.js

15 lines
324 B
JavaScript
Raw Normal View History

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