/* eslint-disable no-undef */ /* eslint-disable @typescript-eslint/no-require-imports */ const router = require('express').Router(); const STUBS = { masters: 'success', orders: 'success', orderView: 'success' }; router.get('/set/:name/:value', (req, res) => { const { name, value } = req.params; STUBS[name] = value; res.send('ok'); }); router.get('/', (req, res) => { res.send(`
Мастера ${generateRadioInput('masters', 'success')} ${generateRadioInput('masters', 'error')}
Заказы ${generateRadioInput('orders', 'success')} ${generateRadioInput('orders', 'error')}
Лендинг - Детали заказа ${generateRadioInput('orderView', 'success')} ${generateRadioInput('orderView', 'error')}
`); }); module.exports = router; module.exports.STUBS = STUBS; function generateRadioInput(name, type) { return ``; }