lobsters allcourses

This commit is contained in:
maratsadykov 2023-08-04 14:22:10 +03:00
parent 4872d552bc
commit 815832d2fb
3 changed files with 36 additions and 0 deletions

View File

@ -40,6 +40,7 @@ app.use(require('./root'))
/**
* Добавляйте сюда свои routers.
*/
app.use('/lobsters', require('./routers/lobsters'))
app.use('/example', require('./routers/example'))
// app.use('/coder', require('./routers/coder'))
app.use('/stc-21-03', require('./routers/stc-21-03'))

View File

@ -0,0 +1,13 @@
const router = require('express').Router()
const first = router.get('/allcourses', (req, res) => {
res.send(require('./stubs/allCourses.json'))
/**
* Этот эндпоинт будет доступен по адресу http://89.223.91.151:8080/multystub/example/first
*/
})
router.use('/example-api', first)
module.exports = router

View File

@ -0,0 +1,22 @@
{
"body": {
"availableCourses": [
{
"id": "1",
"title": "Основы JS (difficulty 1)",
"duration": "6 месяцев",
"difficulty": 1,
"startDate": "2023-04-14T12:54:01.174Z",
"endDate": "2023-12-14T12:54:01.174Z"
},
{
"id": "2",
"title": "Основы JS (difficulty 2)",
"duration": "6 месяцев",
"difficulty": 2,
"startDate": "2023-04-14T12:54:01.174Z",
"endDate": "2023-10-14T12:54:01.174Z"
}
]
}
}