mongoose + tests
This commit is contained in:
40
server/routers/old/car-wash/carousel/carousel-en.json
Normal file
40
server/routers/old/car-wash/carousel/carousel-en.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"status": {
|
||||
"code": 0
|
||||
},
|
||||
|
||||
"banners": [
|
||||
{
|
||||
"img": "first-slide.gif",
|
||||
"title": "Fast and quality service",
|
||||
"description": "1",
|
||||
"color": "black"
|
||||
},
|
||||
{
|
||||
"img": "second-slide.gif",
|
||||
"title": "Affordable prices",
|
||||
"description": "2",
|
||||
"color": "black"
|
||||
},
|
||||
{
|
||||
"img": "third-slide.gif",
|
||||
"title": "Courteous staff",
|
||||
"description": "3",
|
||||
"color": "black"
|
||||
},
|
||||
|
||||
{
|
||||
"img": "fourth-slide.gif",
|
||||
"title": "Comfortable waiting area",
|
||||
"description": "3",
|
||||
"color": "black"
|
||||
},
|
||||
|
||||
{
|
||||
"img": "fifth-slide.gif",
|
||||
"title": "Convenient operating hours",
|
||||
"description": "3",
|
||||
"color": "black"
|
||||
}
|
||||
]
|
||||
}
|
||||
40
server/routers/old/car-wash/carousel/carousel-ru.json
Normal file
40
server/routers/old/car-wash/carousel/carousel-ru.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"status": {
|
||||
"code": 0
|
||||
},
|
||||
|
||||
"banners": [
|
||||
{
|
||||
"img": "first-slide.gif",
|
||||
"title": "Быстрое и качественное обслуживание",
|
||||
"description": "1",
|
||||
"color": "black"
|
||||
},
|
||||
{
|
||||
"img": "second-slide.gif",
|
||||
"title": "Доступные цены",
|
||||
"description": "2",
|
||||
"color": "black"
|
||||
},
|
||||
{
|
||||
"img": "third-slide.gif",
|
||||
"title": "Вежливый персонал",
|
||||
"description": "3",
|
||||
"color": "black"
|
||||
},
|
||||
|
||||
{
|
||||
"img": "fourth-slide.gif",
|
||||
"title": "Комфортная зона ожидания",
|
||||
"description": "3",
|
||||
"color": "black"
|
||||
},
|
||||
|
||||
{
|
||||
"img": "fifth-slide.gif",
|
||||
"title": "Удобное время работы",
|
||||
"description": "3",
|
||||
"color": "black"
|
||||
}
|
||||
]
|
||||
}
|
||||
23
server/routers/old/car-wash/carousel/index.js
Normal file
23
server/routers/old/car-wash/carousel/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// eslint-disable-next-line new-cap
|
||||
const router = require('express').Router()
|
||||
|
||||
router.get('/getBanners', (req, res) => {
|
||||
switch (req.query.lng) {
|
||||
case 'en':
|
||||
res.send(require('./carousel-en.json'))
|
||||
break
|
||||
case 'ru':
|
||||
res.send(require('./carousel-ru.json'))
|
||||
break
|
||||
case 'en-En':
|
||||
res.send(require('./carousel-en.json'))
|
||||
break
|
||||
case 'ru-Ru':
|
||||
res.send(require('./carousel-ru.json'))
|
||||
break
|
||||
default:
|
||||
console.log('Unknown language')
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user