Skip to content

Commit

Permalink
fix: краш-тестовый роут очистить от res
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyKardashev committed Nov 17, 2023
1 parent e572f2b commit 42efac4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ const { login, createUser } = require('../controllers/users');
const wrongRequestsRouter = require('./wrong-requests-router');

// удалить краш-тестовый роут после ревью.
appRouter.get('/crash-test', (req, res) => {
appRouter.get('/crash-test', () => {
setTimeout(() => {
res.send({ message: 'Краш тест - сейчас будет больно' });
throw new Error('Сервер сейчас упадёт');
}, 0);
});
Expand Down

0 comments on commit 42efac4

Please sign in to comment.