Compare commits
No commits in common. "c000106ec8f674e8b11e0fc17829fa10d050cc1a" and "ff15a484144d481233d298c946a8e72cbd53662c" have entirely different histories.
c000106ec8
...
ff15a48414
@ -3,7 +3,6 @@ const router = Router()
|
||||
|
||||
router.use('/eng-it-lean', require('./eng-it-lean/index'))
|
||||
router.use('/sberhubproject', require('./sberhubproject/index'))
|
||||
router.use('/sber_web', require('./sber_web/index'))
|
||||
|
||||
module.exports = router
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
const router = require('express').Router();
|
||||
const listRouter = require('./questions');
|
||||
const questionRouter = require('./question');
|
||||
|
||||
module.exports = router;
|
||||
|
||||
router.use('/questions', listRouter);
|
||||
router.use('/question', questionRouter);
|
@ -1,16 +0,0 @@
|
||||
const axios = require('axios');
|
||||
const router = require('express').Router();
|
||||
|
||||
module.exports = router;
|
||||
|
||||
router.get('/:id', async (req, res) => {
|
||||
const id = req.params.id;
|
||||
const baseUrl = 'http://www.db.chgk.info';
|
||||
try {
|
||||
const data = await axios.get(baseUrl + `/questions/${id}`);
|
||||
res.send(data.data);
|
||||
}
|
||||
catch (e) {
|
||||
res.send(undefined);
|
||||
}
|
||||
});
|
@ -1,16 +0,0 @@
|
||||
const axios = require('axios');
|
||||
const router = require('express').Router();
|
||||
|
||||
module.exports = router;
|
||||
|
||||
router.get('/:page', async (req, res) => {
|
||||
const page = req.params.page;
|
||||
const baseUrl = 'http://www.db.chgk.info';
|
||||
try {
|
||||
const data = await axios.get(baseUrl + `/questions?page=${page}&itemsPerPage=15`);
|
||||
res.send(data.data);
|
||||
}
|
||||
catch (e) {
|
||||
res.send(undefined);
|
||||
}
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user