Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.use('/api/auth', (req, res, next) => {
- function getRandomInt(min, max) {
- // eslint-disable-next-line no-param-reassign
- min = Math.ceil(min);
- // eslint-disable-next-line no-param-reassign
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- const time = getRandomInt(0, 1500);
- setTimeout(() => {
- next();
- }, time);
- });
- app.use('/api/exam', (req, res, next) => {
- function getRandomInt(min, max) {
- // eslint-disable-next-line no-param-reassign
- min = Math.ceil(min);
- // eslint-disable-next-line no-param-reassign
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- const time = getRandomInt(0, 1500);
- setTimeout(() => {
- next();
- }, time);
- });
- app.use('/api/profile', (req, res, next) => {
- function getRandomInt(min, max) {
- // eslint-disable-next-line no-param-reassign
- min = Math.ceil(min);
- // eslint-disable-next-line no-param-reassign
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- const time = getRandomInt(0, 1500);
- setTimeout(() => {
- next();
- }, time);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement