move old to legacy folder
This commit is contained in:
13
.bzr/legacy/lobsters/index.js
Normal file
13
.bzr/legacy/lobsters/index.js
Normal 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
|
||||
22
.bzr/legacy/lobsters/stubs/allCourses.json
Normal file
22
.bzr/legacy/lobsters/stubs/allCourses.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user