2024-12-19 19:51:07 +03:00
|
|
|
const router = require("express").Router();
|
|
|
|
|
|
|
|
const dictionariesRouter = require("./dictionaries");
|
2024-12-27 23:15:26 +03:00
|
|
|
const unitsRouter = require('./units');
|
2024-12-19 19:51:07 +03:00
|
|
|
module.exports = router;
|
|
|
|
|
|
|
|
const delay =
|
2024-12-27 23:15:26 +03:00
|
|
|
(ms = 250) =>
|
2024-12-19 19:51:07 +03:00
|
|
|
(req, res, next) => {
|
|
|
|
setTimeout(next, ms);
|
|
|
|
};
|
|
|
|
|
|
|
|
router.use(delay());
|
|
|
|
router.use("/dictionaries", dictionariesRouter);
|
2024-12-27 23:15:26 +03:00
|
|
|
router.use('/units', unitsRouter);
|