init from origin + update
This commit is contained in:
22
server/routers/car-wash/prices/index.js
Normal file
22
server/routers/car-wash/prices/index.js
Normal file
@@ -0,0 +1,22 @@
|
||||
// eslint-disable-next-line new-cap
|
||||
const router = require('express').Router()
|
||||
|
||||
router.get('/get-prices', (req, res) => {
|
||||
switch (req.query.lng) {
|
||||
case 'en':
|
||||
res.send(require('./prices-en.json'))
|
||||
break
|
||||
case 'ru':
|
||||
res.send(require('./prices-ru.json'))
|
||||
break
|
||||
case 'en-En':
|
||||
res.send(require('./prices-en.json'))
|
||||
break
|
||||
case 'ru-Ru':
|
||||
res.send(require('./prices-en.json'))
|
||||
break
|
||||
default:
|
||||
console.log('Unknown language')
|
||||
}
|
||||
})
|
||||
module.exports = router
|
||||
59
server/routers/car-wash/prices/prices-en.json
Normal file
59
server/routers/car-wash/prices/prices-en.json
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"prices": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "Contactless car wash",
|
||||
"price": "459"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "Nanowash",
|
||||
"price": "759"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "Deluxe wash",
|
||||
"price": "1559"
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"name": "Comprehensive wash",
|
||||
"price": "859"
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"name": "Comprehensive nano wash",
|
||||
"price": "11559"
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"name": "Antireagent",
|
||||
"price": "1400"
|
||||
},
|
||||
{
|
||||
"id": "7",
|
||||
"name": "Antireagent complex",
|
||||
"price": "1800"
|
||||
},
|
||||
{
|
||||
"id": "8",
|
||||
"name": "Express wash",
|
||||
"price": "250"
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"name": "Vacuum cleaner",
|
||||
"price": "250"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"name": "Glass",
|
||||
"price": "250"
|
||||
},
|
||||
{
|
||||
"id": "11",
|
||||
"name": "Plastic polish",
|
||||
"price": "250"
|
||||
}
|
||||
]
|
||||
}
|
||||
59
server/routers/car-wash/prices/prices-ru.json
Normal file
59
server/routers/car-wash/prices/prices-ru.json
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"prices": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "Бесконтактная мойка",
|
||||
"price": "459"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "Наномойка",
|
||||
"price": "759"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "Мойка люкс",
|
||||
"price": "1559"
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"name": "Комплексная мойка",
|
||||
"price": "859"
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"name": "Комплексная наномойка",
|
||||
"price": "11559"
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"name": "Антиреагент",
|
||||
"price": "1400"
|
||||
},
|
||||
{
|
||||
"id": "7",
|
||||
"name": "Антиреагент комплекс",
|
||||
"price": "1800"
|
||||
},
|
||||
{
|
||||
"id": "8",
|
||||
"name": "Экспресс-мойка",
|
||||
"price": "250"
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"name": "Пылесос",
|
||||
"price": "250"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"name": "Стекла",
|
||||
"price": "250"
|
||||
},
|
||||
{
|
||||
"id": "11",
|
||||
"name": "Полироль пластика",
|
||||
"price": "250"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user