Compare commits
6 Commits
v1.1.2
...
kazan-expl
| Author | SHA1 | Date | |
|---|---|---|---|
| e9814f36bf | |||
| eb3f1f7e3f | |||
| d06aeeb246 | |||
| 233192ba01 | |||
| 298a82e0ae | |||
| 335179ad26 |
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "multi-stub",
|
||||
"version": "1.1.2",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "multi-stub",
|
||||
"version": "1.1.2",
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.9",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "multi-stub",
|
||||
"version": "1.1.2",
|
||||
"version": "1.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
2
server/data/const.js
Normal file
@@ -0,0 +1,2 @@
|
||||
exports.TODO_LIST_MODEL_NAME = 'TODO_LIST'
|
||||
exports.TODO_ITEM_MODEL_NAME = 'TODO_ITEM'
|
||||
23
server/data/model/todo/item.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const { Schema, model } = require('mongoose')
|
||||
|
||||
const { TODO_ITEM_MODEL_NAME } = require('../../const')
|
||||
|
||||
const schema = new Schema({
|
||||
title: String,
|
||||
done: { type: Boolean, default: false },
|
||||
closed: Date,
|
||||
created: {
|
||||
type: Date, default: () => new Date().toISOString(),
|
||||
},
|
||||
})
|
||||
|
||||
schema.set('toJSON', {
|
||||
virtuals: true,
|
||||
versionKey: false,
|
||||
})
|
||||
|
||||
schema.virtual('id').get(function () {
|
||||
return this._id.toHexString()
|
||||
})
|
||||
|
||||
exports.ItemModel = model(TODO_ITEM_MODEL_NAME, schema)
|
||||
@@ -1,22 +1,18 @@
|
||||
const { Schema, model } = require('mongoose')
|
||||
|
||||
const { TODO_LIST_MODEL_NAME, TODO_ITEM_MODEL_NAME, TODO_AUTH_USER_MODEL_NAME } = require('../../const')
|
||||
const { TODO_LIST_MODEL_NAME, TODO_ITEM_MODEL_NAME } = require('../../const')
|
||||
|
||||
const schema = new Schema({
|
||||
title: String,
|
||||
created: {
|
||||
type: Date, default: () => new Date().toISOString(),
|
||||
},
|
||||
createdBy: { type: Schema.Types.ObjectId, ref: TODO_AUTH_USER_MODEL_NAME },
|
||||
items: [{ type: Schema.Types.ObjectId, ref: TODO_ITEM_MODEL_NAME }],
|
||||
})
|
||||
|
||||
schema.set('toJSON', {
|
||||
virtuals: true,
|
||||
versionKey: false,
|
||||
transform: function (doc, ret) {
|
||||
delete ret._id
|
||||
}
|
||||
})
|
||||
|
||||
schema.virtual('id').get(function () {
|
||||
@@ -80,7 +80,7 @@ app.use(require("./root"))
|
||||
*/
|
||||
app.use("/kfu-m-24-1", require("./routers/kfu-m-24-1"))
|
||||
app.use("/epja-2024-1", require("./routers/epja-2024-1"))
|
||||
app.use("/v1/todo", require("./routers/todo"))
|
||||
app.use("/todo", require("./routers/todo/routes"))
|
||||
app.use("/dogsitters-finder", require("./routers/dogsitters-finder"))
|
||||
app.use("/kazan-explore", require("./routers/kazan-explore"))
|
||||
app.use("/edateam", require("./routers/edateam-legacy"))
|
||||
|
||||
@@ -1,21 +1,9 @@
|
||||
const router = require('express').Router()
|
||||
const { OrderModel } = require('./model/order')
|
||||
|
||||
router.post('/orders', async (req, res, next) => {
|
||||
const {startDate, endDate} = req.body
|
||||
|
||||
if (!startDate || !endDate) {
|
||||
throw new Error('startDate and endDate are required')
|
||||
}
|
||||
|
||||
const orders = await OrderModel.find({
|
||||
$or: [
|
||||
{startWashTime: { $gte: new Date(startDate), $lte: new Date(endDate) }},
|
||||
{endWashTime: { $gte: new Date(startDate), $lte: new Date(endDate) }},
|
||||
]
|
||||
})
|
||||
|
||||
res.status(200).send({ success: true, body: orders })
|
||||
router.get('/orders', (req, res) => {
|
||||
res
|
||||
.status(200)
|
||||
.send(require(`./json/arm-orders/success.json`))
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
const router = require('express').Router()
|
||||
const armMasterRouter = require('./arm-master')
|
||||
const armOrdersRouter = require('./arm-orders')
|
||||
const orderRouter = require('./order')
|
||||
|
||||
|
||||
router.use('/arm', armMasterRouter)
|
||||
router.use('/arm', armOrdersRouter)
|
||||
router.use('/order', orderRouter)
|
||||
|
||||
|
||||
module.exports = router
|
||||
|
||||
@@ -2,59 +2,24 @@
|
||||
"success": true,
|
||||
"body": [
|
||||
{
|
||||
"phone": "+79876543210",
|
||||
"carNumber": "А123ВЕ16",
|
||||
"carBody": 1,
|
||||
"carColor": "#ffff00",
|
||||
"startWashTime": "2025-05-12T08:21:00.000Z",
|
||||
"endWashTime": "2025-05-12T08:22:00.000Z",
|
||||
"location": "55.792799704829854,49.11034340707925 Республика Татарстан (Татарстан), Казань, улица Чернышевского",
|
||||
"id": "order1",
|
||||
"carNumber": "A123BC",
|
||||
"startWashTime": "2024-11-24T10:30:00.000Z",
|
||||
"endWashTime": "2024-11-24T16:30:00.000Z",
|
||||
"orderDate": "2024-11-24T08:41:46.366Z",
|
||||
"status": "progress",
|
||||
"notes": "",
|
||||
"created": "2025-01-18T17:43:21.488Z",
|
||||
"updated": "2025-01-18T17:43:21.492Z"
|
||||
"phone": "79001234563",
|
||||
"location": "Казань, ул. Баумана, 1"
|
||||
},
|
||||
{
|
||||
"phone": "89876543210",
|
||||
"carNumber": "К456МН23",
|
||||
"carBody": 2,
|
||||
"carColor": "#ffffff",
|
||||
"startWashTime": "2025-01-12T08:21:00Z",
|
||||
"endWashTime": "2025-01-12T08:22:00Z",
|
||||
"location": "55.808430668108585,49.198608125449255 Республика Татарстан (Татарстан), Казань, улица Академика Губкина, 50/1",
|
||||
"status": "pending",
|
||||
"notes": "заметки заметки заметки заметки заметки заметки заметки заметки заметки заметки заметки заметки заметки заметки заметки",
|
||||
"created": "2025-01-18T17:46:10.388Z",
|
||||
"updated": "2025-01-18T17:46:10.395Z",
|
||||
"id": "678be8e211e62f4a61790cca"
|
||||
},
|
||||
{
|
||||
"phone": "4098765432105",
|
||||
"carNumber": "О789РС777",
|
||||
"carBody": 3,
|
||||
"carColor": "красный",
|
||||
"startWashTime": "2025-08-12T08:21:00.000Z",
|
||||
"endWashTime": "2025-08-12T08:22:00.000Z",
|
||||
"location": "55.78720449830353,49.12111640202319 Республика Татарстан (Татарстан), Казань, улица Пушкина, 5/43",
|
||||
"status": "cancelled",
|
||||
"notes": "Заказ отменен по запросу самого клиента",
|
||||
"created": "2025-01-18T17:47:46.294Z",
|
||||
"updated": "2025-01-18T17:47:46.295Z",
|
||||
"id": "678be8e211e62f4a61790ccb"
|
||||
},
|
||||
{
|
||||
"phone": "+79876543210",
|
||||
"carNumber": "Т123УХ716",
|
||||
"carBody": 99,
|
||||
"carColor": "чайная роза",
|
||||
"startWashTime": "2025-01-11T11:21:00.000Z",
|
||||
"endWashTime": "2025-01-12T11:22:00.000Z",
|
||||
"location": "55.77063673480112,49.22182909159608 Республика Татарстан (Татарстан), Казань, Советский район, микрорайон Азино-2",
|
||||
"id": "order2",
|
||||
"carNumber": "A245BC",
|
||||
"startWashTime": "2024-11-24T11:30:00.000Z",
|
||||
"endWashTime": "2024-11-24T17:30:00.000Z",
|
||||
"orderDate": "2024-11-24T07:40:46.366Z",
|
||||
"status": "progress",
|
||||
"notes": "Клиент остался доволен, предложить в следующий раз акцию",
|
||||
"created": "2025-01-18T17:55:05.691Z",
|
||||
"updated": "2025-01-18T17:55:05.695Z",
|
||||
"id": "678be8e211e62f4a61790ccc"
|
||||
"phone": "79001234567",
|
||||
"location": "Казань, ул. Баумана, 43"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
const orderStatus = {
|
||||
CANCELLED: 'cancelled',
|
||||
PROGRESS: 'progress',
|
||||
PENDING: 'pending',
|
||||
WORKING: 'working',
|
||||
COMPLETE: 'complete',
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
orderStatus
|
||||
}
|
||||
@@ -11,9 +11,6 @@ const schema = new Schema({
|
||||
schema.set('toJSON', {
|
||||
virtuals: true,
|
||||
versionKey: false,
|
||||
transform(_doc, ret) {
|
||||
delete ret._id;
|
||||
}
|
||||
})
|
||||
|
||||
schema.virtual('id').get(function () {
|
||||
|
||||
@@ -1,58 +1,26 @@
|
||||
const { Schema, model } = require('mongoose')
|
||||
const { orderStatus } = require('./const')
|
||||
|
||||
const schema = new Schema({
|
||||
phone: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
carNumber: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
carBody: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
carColor: String,
|
||||
startWashTime: {
|
||||
type: Date,
|
||||
required: true
|
||||
},
|
||||
endWashTime: {
|
||||
type: Date,
|
||||
required: true
|
||||
},
|
||||
location: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true,
|
||||
enum: Object.values(orderStatus)
|
||||
},
|
||||
master: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'dry-wash-master'
|
||||
},
|
||||
notes: String,
|
||||
startWashTime: {type: String, required: true},
|
||||
endWashTime: {type: String, required: true},
|
||||
orderDate: {type: String, required: true},
|
||||
location: {type: String, required: true},
|
||||
phone: {type: String, required: true},
|
||||
status: {type: String, required: true},
|
||||
carNumber: {type: String, required: true},
|
||||
created: {
|
||||
type: Date,
|
||||
default: () => new Date().toISOString(),
|
||||
type: Date, default: () => new Date().toISOString(),
|
||||
},
|
||||
updated: {
|
||||
type: Date,
|
||||
default: () => new Date().toISOString(),
|
||||
type: Date, default: () => new Date().toISOString(),
|
||||
},
|
||||
master: {type: Schema.Types.ObjectId, ref: 'dry-wash-master'},
|
||||
notes: String,
|
||||
})
|
||||
|
||||
schema.set('toJSON', {
|
||||
virtuals: true,
|
||||
versionKey: false,
|
||||
transform(_doc, ret) {
|
||||
delete ret._id
|
||||
}
|
||||
})
|
||||
|
||||
schema.virtual('id').get(function () {
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
const mongoose = require("mongoose")
|
||||
const router = require('express').Router()
|
||||
const { MasterModel } = require('./model/master')
|
||||
const { OrderModel } = require('./model/order')
|
||||
const { orderStatus } = require('./model/const')
|
||||
|
||||
const isValidPhoneNumber = (value) => /^(\+)?\d{9,15}/.test(value)
|
||||
const isValidCarNumber = (value) => /^[авекмнорстух][0-9]{3}[авекмнорстух]{2}[0-9]{2,3}$/i.test(value)
|
||||
const isValidCarBodyType = (value) => typeof value === 'number' && value > 0 && value < 100
|
||||
const isValidCarColor = (value) => value.length < 50 && /^[#a-z0-9а-я-\s,.()]+$/i.test(value)
|
||||
const isValidISODate = (value) => /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:.\d{1,3})?Z$/.test(value)
|
||||
|
||||
const latitudeRe = /^(-?[1-8]?\d(?:\.\d{1,18})?|90(?:\.0{1,18})?)$/
|
||||
const longitudeRe = /^(-?(?:1[0-7]|[1-9])?\d(?:\.\d{1,18})?|180(?:\.0{1,18})?)$/
|
||||
const addressRe = /^[а-я0-9\s,.'-/()]*$/i
|
||||
const isValidLocation = (value) => {
|
||||
if (value.length > 200) {
|
||||
return false
|
||||
}
|
||||
|
||||
const [coordinates, address] = value.split(' ')
|
||||
const [latitude, longitude] = coordinates.split(',')
|
||||
return latitudeRe.test(latitude) && longitudeRe.test(longitude) && addressRe.test(address)
|
||||
}
|
||||
|
||||
const isValidOrderStatus = (value) => Object.values(orderStatus).includes(value)
|
||||
const isValidOrderNotes = (value) => value.length < 500
|
||||
|
||||
const VALIDATION_MESSAGES = {
|
||||
order: {
|
||||
notFound: 'Order not found'
|
||||
},
|
||||
orderId: {
|
||||
invalid: 'Valid order ID is required',
|
||||
},
|
||||
orderStatus: {
|
||||
invalid: 'Invalid order status'
|
||||
},
|
||||
orderNotes: {
|
||||
invalid: 'Invalid order notes'
|
||||
},
|
||||
master: {
|
||||
notFound: 'Master not found'
|
||||
},
|
||||
masterId: {
|
||||
invalid: 'Invalid master ID',
|
||||
},
|
||||
phoneNumber: {
|
||||
required: 'Phone number is required',
|
||||
invalid: 'Invalid phone number'
|
||||
},
|
||||
carNumber: {
|
||||
required: 'Car number is required',
|
||||
invalid: 'Invalid car number'
|
||||
},
|
||||
carBody: {
|
||||
required: 'Car body type is required',
|
||||
invalid: 'Invalid car body type'
|
||||
},
|
||||
carColor: {
|
||||
invalid: 'Invalid car color'
|
||||
},
|
||||
washingBegin: {
|
||||
required: 'Begin time of washing is required',
|
||||
invalid: 'Invalid begin time of washing'
|
||||
},
|
||||
washingEnd: {
|
||||
required: 'End time of washing is required',
|
||||
invalid: 'Invalid end time of washing'
|
||||
},
|
||||
washingLocation: {
|
||||
required: 'Location of washing is required',
|
||||
invalid: 'Invalid location of washing'
|
||||
},
|
||||
}
|
||||
|
||||
router.post('/create', async (req, res, next) => {
|
||||
const bodyErrors = []
|
||||
|
||||
const { customer } = req.body
|
||||
if (!customer.phone) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.phoneNumber.required)
|
||||
} else if (!isValidPhoneNumber(customer.phone)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.phoneNumber.invalid)
|
||||
}
|
||||
|
||||
const { car } = req.body
|
||||
if (!car.number) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.carNumber.required)
|
||||
} else if (!isValidCarNumber(car.number)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.carNumber.invalid)
|
||||
}
|
||||
if (!car.body) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.carBody.required)
|
||||
} else if (!isValidCarBodyType(car.body)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.carBody.invalid)
|
||||
}
|
||||
if (!isValidCarColor(car.color)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.carColor.invalid)
|
||||
}
|
||||
|
||||
const { washing } = req.body
|
||||
if (!washing.begin) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.washingBegin.required)
|
||||
} else if (!isValidISODate(washing.begin)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.washingBegin.invalid)
|
||||
}
|
||||
if (!washing.end) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.washingEnd.required)
|
||||
} else if (!isValidISODate(washing.end)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.washingEnd.invalid)
|
||||
}
|
||||
if (!washing.location) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.washingLocation.required)
|
||||
} else if (!isValidLocation(washing.location)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.washingLocation.invalid)
|
||||
}
|
||||
|
||||
if (bodyErrors.length > 0) {
|
||||
throw new Error(bodyErrors.join(', '))
|
||||
}
|
||||
|
||||
try {
|
||||
const order = await OrderModel.create({
|
||||
phone: customer.phone,
|
||||
carNumber: car.number,
|
||||
carBody: car.body,
|
||||
carColor: car.color,
|
||||
startWashTime: washing.begin,
|
||||
endWashTime: washing.end,
|
||||
location: washing.location,
|
||||
status: orderStatus.PROGRESS,
|
||||
notes: '',
|
||||
created: new Date().toISOString(),
|
||||
})
|
||||
|
||||
res.status(200).send({ success: true, body: order })
|
||||
|
||||
} catch (error) {
|
||||
next(error)
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/:id', async (req, res, next) => {
|
||||
const { id } = req.params
|
||||
if (!mongoose.Types.ObjectId.isValid(id)) {
|
||||
throw new Error(VALIDATION_MESSAGES.orderId.invalid)
|
||||
}
|
||||
|
||||
try {
|
||||
const order = await OrderModel.findById(id)
|
||||
if (!order) {
|
||||
throw new Error(VALIDATION_MESSAGES.order.notFound)
|
||||
}
|
||||
|
||||
res.status(200).send({ success: true, body: order })
|
||||
} catch (error) {
|
||||
next(error)
|
||||
}
|
||||
})
|
||||
|
||||
router.patch('/:id', async (req, res, next) => {
|
||||
const { id } = req.params
|
||||
if (!mongoose.Types.ObjectId.isValid(id)) {
|
||||
throw new Error(VALIDATION_MESSAGES.orderId.invalid)
|
||||
}
|
||||
|
||||
const bodyErrors = []
|
||||
|
||||
const { status } = req.body
|
||||
if (status) {
|
||||
if (!isValidOrderStatus(status)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.orderStatus.invalid)
|
||||
}
|
||||
}
|
||||
|
||||
const { master: masterId } = req.body
|
||||
if (masterId) {
|
||||
if (!mongoose.Types.ObjectId.isValid(masterId)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.masterId.invalid)
|
||||
} else {
|
||||
try {
|
||||
const master = await MasterModel.findById(masterId)
|
||||
if (!master) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.master.notFound)
|
||||
}
|
||||
} catch (error) {
|
||||
next(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const { notes } = req.body
|
||||
if (notes) {
|
||||
if (!isValidOrderNotes(notes)) {
|
||||
bodyErrors.push(VALIDATION_MESSAGES.orderNotes.invalid)
|
||||
}
|
||||
}
|
||||
|
||||
if (bodyErrors.length > 0) {
|
||||
throw new Error(bodyErrors.join(', '))
|
||||
}
|
||||
|
||||
try {
|
||||
const updateData = {}
|
||||
if (status) {
|
||||
updateData.status = status
|
||||
}
|
||||
if (masterId) {
|
||||
updateData.master = masterId
|
||||
}
|
||||
if (notes) {
|
||||
updateData.notes = notes
|
||||
}
|
||||
updateData.updated = new Date().toISOString()
|
||||
|
||||
const order = await OrderModel.findByIdAndUpdate(
|
||||
id,
|
||||
updateData,
|
||||
{ new: true }
|
||||
)
|
||||
if (!order) {
|
||||
throw new Error(VALIDATION_MESSAGES.order.notFound)
|
||||
}
|
||||
|
||||
res.status(200).send({ success: true, body: order })
|
||||
} catch (error) {
|
||||
next(error)
|
||||
}
|
||||
})
|
||||
|
||||
router.delete('/:id', async (req, res, next) => {
|
||||
const { id } = req.params
|
||||
if (!mongoose.Types.ObjectId.isValid(id)) {
|
||||
throw new Error(VALIDATION_MESSAGES.orderId.invalid)
|
||||
}
|
||||
|
||||
try {
|
||||
const order = await OrderModel.findByIdAndDelete(id, {
|
||||
new: true,
|
||||
})
|
||||
if (!order) {
|
||||
throw new Error(VALIDATION_MESSAGES.order.notFound)
|
||||
}
|
||||
res.status(200).send({ success: true, body: order })
|
||||
} catch (error) {
|
||||
next(error)
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
@@ -1,24 +0,0 @@
|
||||
const Router = require('express').Router
|
||||
|
||||
const router = Router()
|
||||
|
||||
router.post('/auth/login', (req, res) => {
|
||||
if (req.body.email === 'qwerty@mail.ru') {
|
||||
res.status(200).send(require('./json/login/login-success.json'))
|
||||
} else {
|
||||
res.status(401).send(require('./json/login/login-error.json'));
|
||||
}
|
||||
})
|
||||
|
||||
router.post('/auth/register', (req, res) => {
|
||||
res.status(400).send(require('./json/registration/registration-error.json'))
|
||||
// res.status(201).send(require('./json/registration/registration-error.json'))
|
||||
})
|
||||
|
||||
router.post('/auth/reset-password', (req, res) => {
|
||||
res.status(200).send(require('./json/reset-password/reset-password-success.json'))
|
||||
// res.status(404).send(require('./json/reset-password/reset-password-error.json'))
|
||||
})
|
||||
|
||||
|
||||
module.exports = router;
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"success": false,
|
||||
"body": null,
|
||||
"errors": [
|
||||
{
|
||||
"code": "AUTH_INVALID_CREDENTIALS",
|
||||
"message": "Неверное имя пользователя или пароль"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"success": true,
|
||||
"body": {
|
||||
"token": "AUTH_TOKEN"
|
||||
},
|
||||
"errors": [],
|
||||
"warnings": []
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"success": false,
|
||||
"body": null,
|
||||
"errors": [
|
||||
{
|
||||
"code": "REGISTRATION_EMAIL_TAKEN",
|
||||
"message": "Электронная почта уже используется"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"success": true,
|
||||
"body": {
|
||||
"userId": "12345",
|
||||
"token": "AUTH_TOKEN"
|
||||
},
|
||||
"errors": [],
|
||||
"warnings": []
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"success": false,
|
||||
"body": null,
|
||||
"errors": [
|
||||
{
|
||||
"code": "RESET_PASSWORD_EMAIL_NOT_FOUND",
|
||||
"message": "Адрес электронной почты не зарегистрирован"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"success": true,
|
||||
"body": {
|
||||
"message": "Отправлено электронное письмо для сброса пароля"
|
||||
},
|
||||
"errors": [],
|
||||
"warnings": []
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
router.use('/performer', require('./dashboard-performer'))
|
||||
router.use('/auth', require('./auth'))
|
||||
router.use('/landing', require('./landing'))
|
||||
|
||||
module.exports = router;
|
||||
@@ -1,29 +0,0 @@
|
||||
const Router = require('express').Router;
|
||||
|
||||
const router = Router()
|
||||
|
||||
const values = {
|
||||
'blocks': 'success',
|
||||
'application': 'success'
|
||||
}
|
||||
|
||||
const timer = (_req, _res, next) => {
|
||||
setTimeout(() => next(), 500)
|
||||
}
|
||||
|
||||
router.use(timer)
|
||||
|
||||
router.get(
|
||||
'/blocks',
|
||||
(req, res) =>
|
||||
res.send(require(`./json/blocks-${values['blocks']}.json`))
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/application',
|
||||
(req, res) => {
|
||||
res.send(require(`./json/application-${values['application']}.json`))
|
||||
}
|
||||
)
|
||||
|
||||
module.exports = router
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"success": false,
|
||||
"body": { },
|
||||
"errors": [
|
||||
"Что-то пошло не так"
|
||||
]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"success": true,
|
||||
"body": { }
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"success": false,
|
||||
"body": {
|
||||
"blocks": []
|
||||
},
|
||||
"errors": [
|
||||
"Что-то пошло не так"
|
||||
]
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"success": true,
|
||||
"body": {
|
||||
"blocks": [
|
||||
{
|
||||
"titleKey":"block1.title",
|
||||
"textKey":"block1.subtitle",
|
||||
"imageName":"truck1"
|
||||
},
|
||||
{
|
||||
"titleKey":"block2.title",
|
||||
"textKey":"block2.subtitle",
|
||||
"imageName":"truck2"
|
||||
},
|
||||
{
|
||||
"titleKey":"block3.title",
|
||||
"textKey":"block3.subtitle",
|
||||
"imageName":"truck3"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,6 @@ router.get("/game-page", (request, response) => {
|
||||
response.send(require("./json/gamepage/success.json"));
|
||||
});
|
||||
|
||||
router.get("/update-like", (request, response) => {
|
||||
response.send(require("./json/gamepage/success.json"));
|
||||
});
|
||||
|
||||
router.get("/categories", (request, response) => {
|
||||
response.send(require("./json/categories/success.json"));
|
||||
});
|
||||
@@ -20,73 +16,4 @@ router.get("/home", (request, response) => {
|
||||
response.send(require("./json/home-page-data/success.json"));
|
||||
});
|
||||
|
||||
router.get("/all-games", (request, response) => {
|
||||
response.send(require("./json/home-page-data/all-games.json"));
|
||||
});
|
||||
|
||||
|
||||
// // Маршрут для обновления лайков
|
||||
// router.post("/update-like", (request, response) => {
|
||||
// const { username, likes } = request.body;
|
||||
|
||||
// // Эмулируем успешное обновление лайков
|
||||
// console.log(`Лайки для пользователя ${username} обновлены до ${likes}`);
|
||||
|
||||
// response.status(200).json({
|
||||
// success: true,
|
||||
// message: `Лайки для пользователя ${username} обновлены до ${likes}`,
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
const fs = require("fs").promises;
|
||||
const path = require("path");
|
||||
|
||||
// Path to JSON file
|
||||
const commentsFilePath = path.join(__dirname, "./json/gamepage/success.json");
|
||||
|
||||
// Read JSON file
|
||||
async function readComments() {
|
||||
const data = await fs.readFile(commentsFilePath, "utf-8");
|
||||
const parsedData = JSON.parse(data);
|
||||
console.log("Прочитанные данные:", parsedData); // Логируем полученные данные
|
||||
return parsedData;
|
||||
}
|
||||
// Write to JSON file
|
||||
async function writeComments(data) {
|
||||
await fs.writeFile(commentsFilePath, JSON.stringify(data, null, 2), "utf-8");
|
||||
}
|
||||
|
||||
// Update likes route
|
||||
router.post("/update-like", async (req, res) => {
|
||||
const { username, likes } = req.body;
|
||||
|
||||
if (!username || likes === undefined) {
|
||||
return res.status(400).json({ success: false, message: "Invalid input" });
|
||||
}
|
||||
|
||||
try {
|
||||
const data = await readComments();
|
||||
const comment = data.data.comments.find((c) => c.username === username);
|
||||
|
||||
if (comment) {
|
||||
comment.likes = likes;
|
||||
await writeComments(data); // Сохраняем обновленные данные в файл
|
||||
|
||||
// Возвращаем актуализированные данные
|
||||
res.status(200).json({
|
||||
success: true,
|
||||
message: "Likes updated successfully",
|
||||
data: data.data, // Возвращаем актуализированные данные
|
||||
});
|
||||
} else {
|
||||
res.status(404).json({ success: false, message: "Comment not found" });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error updating likes:", error);
|
||||
res.status(500).json({ success: false, message: "Server error" });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router;
|
||||
@@ -8,18 +8,14 @@
|
||||
"price": 259,
|
||||
"old_price": 500,
|
||||
"image": "sales_game1",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "Red Solstice 2 Survivors",
|
||||
"price": 561,
|
||||
"image": "sales_game2",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
@@ -27,9 +23,7 @@
|
||||
"price": 820,
|
||||
"old_price": 1100,
|
||||
"image": "new_game2",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
@@ -37,9 +31,7 @@
|
||||
"price": 990,
|
||||
"old_price": 1200,
|
||||
"image": "leaders_game4",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
@@ -47,9 +39,7 @@
|
||||
"price": 1200,
|
||||
"old_price": 2500,
|
||||
"image": "leaders_game5",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
@@ -57,39 +47,31 @@
|
||||
"price": 600,
|
||||
"old_price": 890,
|
||||
"image": "leaders_game6",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
}
|
||||
],
|
||||
"games2": [
|
||||
{
|
||||
"id": 7,
|
||||
"id": 1,
|
||||
"title": "Alpha League",
|
||||
"price": 299,
|
||||
"image": "new_game1",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"id": 2,
|
||||
"title": "Sons Of The Forests",
|
||||
"price": 820,
|
||||
"old_price": 1100,
|
||||
"image": "new_game2",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"id": 3,
|
||||
"title": "Pacific Drives",
|
||||
"price": 1799,
|
||||
"image": "new_game3",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
@@ -97,9 +79,7 @@
|
||||
"price": 990,
|
||||
"old_price": 1200,
|
||||
"image": "leaders_game4",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
@@ -107,9 +87,7 @@
|
||||
"price": 1200,
|
||||
"old_price": 2500,
|
||||
"image": "leaders_game5",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
@@ -117,39 +95,31 @@
|
||||
"price": 600,
|
||||
"old_price": 890,
|
||||
"image": "leaders_game6",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
}
|
||||
],
|
||||
"games3": [
|
||||
{
|
||||
"id": 10,
|
||||
"id": 1,
|
||||
"title": "Elden Ring",
|
||||
"price": 3295,
|
||||
"old_price": 3599,
|
||||
"image": "leaders_game2",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"id": 2,
|
||||
"title": "Counter-Strike 2",
|
||||
"price": 479,
|
||||
"image": "leaders_game1",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"id": 3,
|
||||
"title": "PUBG: BATTLEGROUNDS",
|
||||
"price": 199,
|
||||
"image": "leaders_game3",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
@@ -157,9 +127,7 @@
|
||||
"price": 990,
|
||||
"old_price": 1200,
|
||||
"image": "leaders_game4",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
@@ -167,9 +135,7 @@
|
||||
"price": 1200,
|
||||
"old_price": 2500,
|
||||
"image": "leaders_game5",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
@@ -177,9 +143,7 @@
|
||||
"price": 600,
|
||||
"old_price": 890,
|
||||
"image": "leaders_game6",
|
||||
"os": "windows",
|
||||
"fav1": "star1",
|
||||
"fav2": "star2"
|
||||
"os": "windows"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,35 +1,24 @@
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"comments": [
|
||||
{
|
||||
"username": "Пользователь1",
|
||||
"text": "Текст комментария 1",
|
||||
"likes": 9,
|
||||
"rating": 8,
|
||||
"date": "2025-03-01T10:00:00Z"
|
||||
},
|
||||
{
|
||||
"username": "Пользователь2",
|
||||
"text": "Текст комментария 2",
|
||||
"likes": 7,
|
||||
"rating": 7,
|
||||
"date": "2025-01-01T10:00:00Z"
|
||||
},
|
||||
{
|
||||
"username": "Пользователь3",
|
||||
"text": "Текст комментария 3",
|
||||
"likes": 5,
|
||||
"rating": 3,
|
||||
"date": "2025-02-01T10:00:00Z"
|
||||
},
|
||||
{
|
||||
"username": "Пользователь4",
|
||||
"text": "Текст комментария 4",
|
||||
"likes": 15,
|
||||
"rating": 2,
|
||||
"date": "2025-12-01T10:00:00Z"
|
||||
}
|
||||
]
|
||||
"success": true,
|
||||
"data": {
|
||||
"comments": [
|
||||
{
|
||||
"username": "Пользователь1",
|
||||
"text": "Текст комментария 1"
|
||||
},
|
||||
{
|
||||
"username": "Пользователь2",
|
||||
"text": "Текст комментария 2"
|
||||
},
|
||||
{
|
||||
"username": "Пользователь3",
|
||||
"text": "Текст комментария 3"
|
||||
},
|
||||
{
|
||||
"username": "Пользователь4",
|
||||
"text": "Текст комментария 4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
{
|
||||
"success": true,
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "The Witcher 3: Wild Hunt",
|
||||
"image": "game1",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_1",
|
||||
"description": "Эпическая RPG с открытым миром, в которой Геральт из Ривии охотится на монстров и раскрывает политические заговоры.",
|
||||
"category": "RPG"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Red Dead Redemption 2",
|
||||
"image": "game2",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_2",
|
||||
"description": "Приключенческая игра с открытым миром на Диком Западе, рассказывающая историю Артура Моргана.",
|
||||
"category": "Adventures"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Forza Horizon 5",
|
||||
"image": "game3",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_3",
|
||||
"description": "Гоночная игра с огромным открытым миром, действие которой происходит в Мексике.",
|
||||
"category": "Race"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Atomic Heart",
|
||||
"image": "game4",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_4",
|
||||
"description": "Экшен-шутер с элементами RPG, разворачивающийся в альтернативной Советской России.",
|
||||
"category": "Shooters"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Counter-Strike 2",
|
||||
"image": "game5",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_5",
|
||||
"description": "Популярный онлайн-шутер с соревновательным геймплеем и тактическими элементами.",
|
||||
"category": "Shooters"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Grand Theft Auto V",
|
||||
"image": "game6",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_6",
|
||||
"description": "Игра с открытым миром, где можно погрузиться в криминальный мир Лос-Сантоса.",
|
||||
"category": "Adventures"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Assassin’s Creed IV: Black Flag",
|
||||
"image": "game7",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_7",
|
||||
"description": "Приключенческая игра о пиратах и морских сражениях в эпоху золотого века пиратства.",
|
||||
"category": "Adventures"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Spider-Man",
|
||||
"image": "game8",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_8",
|
||||
"description": "Игра о супергерое Человеке-пауке с захватывающими битвами и паркуром по Нью-Йорку.",
|
||||
"category": "Action"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "Assassin’s Creed Mirage",
|
||||
"image": "game9",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_9",
|
||||
"description": "Приключенческая игра с упором на скрытность, вдохновленная классическими частями серии.",
|
||||
"category": "Action"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "Assassin’s Creed Valhalla",
|
||||
"image": "game10",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_10",
|
||||
"description": "RPG с открытым миром о викингах, включающая битвы, исследования и строительство поселений.",
|
||||
"category": "RPG"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "ARK: Survival Evolved",
|
||||
"image": "game11",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_11",
|
||||
"description": "Выживание в открытом мире с динозаврами, строительством и многопользовательскими элементами.",
|
||||
"category": "Simulators"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "FIFA 23",
|
||||
"image": "game12",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_12",
|
||||
"description": "Популярный футбольный симулятор с улучшенной графикой и реалистичным геймплеем.",
|
||||
"category": "Sports"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "Dirt 5",
|
||||
"image": "game13",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_13",
|
||||
"description": "Аркадная гоночная игра с фокусом на ралли и внедорожных соревнованиях.",
|
||||
"category": "Race"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "Cyberpunk 2077",
|
||||
"image": "game14",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_14",
|
||||
"description": "RPG в киберпанк-сеттинге с нелинейным сюжетом и детализированным открытым миром.",
|
||||
"category": "RPG"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "Age of Empires IV",
|
||||
"image": "game15",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_15",
|
||||
"description": "Классическая стратегия в реальном времени с историческими кампаниями.",
|
||||
"category": "Strategies"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "Civilization VI",
|
||||
"image": "game16",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_16",
|
||||
"description": "Глобальная пошаговая стратегия, в которой игроки строят и развивают цивилизации.",
|
||||
"category": "Strategies"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,115 +4,87 @@
|
||||
"topSail": [
|
||||
{
|
||||
"image": "game1",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_1"
|
||||
"text": "$10"
|
||||
},
|
||||
{
|
||||
"image": "game2",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_2"
|
||||
"text": "$10"
|
||||
},
|
||||
{
|
||||
"image": "game3",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_3"
|
||||
"text": "$10"
|
||||
},
|
||||
{
|
||||
"image": "game4",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_4"
|
||||
"text": "$10"
|
||||
},
|
||||
{
|
||||
"image": "game5",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_5"
|
||||
"text": "$10"
|
||||
},
|
||||
{
|
||||
"image": "game6",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_6"
|
||||
"text": "$10"
|
||||
},
|
||||
{
|
||||
"image": "game7",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_7"
|
||||
"text": "$10"
|
||||
},
|
||||
{
|
||||
"image": "game8",
|
||||
"text": "$10",
|
||||
"imgPath": "img_top_8"
|
||||
"text": "$10"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"image": "category1",
|
||||
"text": "гонки",
|
||||
"imgPath": "img_categories_1",
|
||||
"category": "Race"
|
||||
"text": "гонки"
|
||||
},
|
||||
{
|
||||
"image": "category2",
|
||||
"text": "глубокий сюжет",
|
||||
"imgPath": "img_categories_2",
|
||||
"category": ""
|
||||
"text": "глубокий сюжет"
|
||||
},
|
||||
{
|
||||
"image": "category3",
|
||||
"text": "симуляторы",
|
||||
"imgPath": "img_categories_3",
|
||||
"category": "Simulators"
|
||||
"text": "симуляторы"
|
||||
},
|
||||
{
|
||||
"image": "category4",
|
||||
"text": "открытый мир",
|
||||
"imgPath": "img_categories_4",
|
||||
"category": "RPG"
|
||||
"text": "открытый мир"
|
||||
},
|
||||
{
|
||||
"image": "category5",
|
||||
"text": "экшен",
|
||||
"imgPath": "img_categories_5",
|
||||
"category": "Action"
|
||||
"text": "экшен"
|
||||
},
|
||||
{
|
||||
"image": "category6",
|
||||
"text": "стратегии",
|
||||
"imgPath": "img_categories_6",
|
||||
"category": "Strategies"
|
||||
"text": "стратегии"
|
||||
},
|
||||
{
|
||||
"image": "category7",
|
||||
"text": "шутеры",
|
||||
"imgPath": "img_categories_7",
|
||||
"category": "Shooters"
|
||||
"text": "шутеры"
|
||||
},
|
||||
{
|
||||
"image": "category8",
|
||||
"text": "приключения",
|
||||
"imgPath": "img_categories_8",
|
||||
"category": "Adventures"
|
||||
"text": "приключения"
|
||||
}
|
||||
],
|
||||
"news": [
|
||||
{
|
||||
"image": "news1",
|
||||
"text": "Разработчики Delta Force: Hawk Ops представили крупномасштабный режим Havoc Warfare",
|
||||
"imgPath": "img_news_1"
|
||||
"text": "Разработчики Delta Force: Hawk Ops представили крупномасштабный режим Havoc Warfare"
|
||||
},
|
||||
{
|
||||
"image": "news2",
|
||||
"text": "Первый трейлер Assassin’s Creed Shadows — с темнокожим самураем в феодальной Японии",
|
||||
"imgPath": "img_news_2"
|
||||
"text": "Первый трейлер Assassin’s Creed Shadows — с темнокожим самураем в феодальной Японии"
|
||||
},
|
||||
{
|
||||
"image": "news3",
|
||||
"text": "Призрак Цусимы» вышел на ПК — и уже ставит рекорды для Sony",
|
||||
"imgPath": "img_news_3"
|
||||
"text": "Призрак Цусимы» вышел на ПК — и уже ставит рекорды для Sony"
|
||||
},
|
||||
{
|
||||
"image": "news4",
|
||||
"text": "Авторы Skull and Bones расширяют планы на второй сезо",
|
||||
"imgPath": "img_news_4"
|
||||
"text": "Авторы Skull and Bones расширяют планы на второй сезо"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
3
server/routers/kazan-explore/const.js
Normal file
@@ -0,0 +1,3 @@
|
||||
exports.KAZAN_EXPLORE_RESULTS_MODEL_NAME = 'KAZAN_EXPLORE_RESULTS'
|
||||
|
||||
exports.TOKEN_KEY = "kazan-explore_top_secret_key_hbfhqf9jq9prg"
|
||||
@@ -1,211 +1,310 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
|
||||
// First page
|
||||
router.get('/getInfoAboutKazan', (request, response) => {
|
||||
const lang = request.query.lang || 'ru'; // Получаем язык из параметров запроса
|
||||
try {
|
||||
const data = require('./json/first/info-about-kazan/success.json'); // Загружаем весь JSON
|
||||
const translatedData = data[lang] || data['ru']; // Выбираем перевод по языку или дефолтный
|
||||
response.send(translatedData); // Отправляем перевод клиенту
|
||||
} catch (error) {
|
||||
response.status(500).send({ message: 'Internal server error' }); // Ошибка в случае проблем с JSON
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/getNews', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/first/news/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Sport page
|
||||
router.get('/getFirstText', (request, response) => {
|
||||
const lang = request.query.lang || 'ru'; // Получаем язык из параметров
|
||||
try {
|
||||
const data = require('./json/sport/first-text/success.json'); // Загружаем JSON
|
||||
const translatedData = data[lang] || data['ru']; // Берём перевод или дефолтный
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' }); // Обработка ошибки
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/getSecondText', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/sport/second-text/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/getSportData', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/sport/sport-list/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/getSportQuiz', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/sport/quiz/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Places page
|
||||
router.get('/getPlacesData', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/places/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Transport page
|
||||
router.get('/getInfoAboutTransportPage', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/transport/info-about-page/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/getBus', (request, response) => {
|
||||
response.send(require('./json/transport/bus-numbers/success.json'))
|
||||
})
|
||||
|
||||
router.get('/getTral', (request, response) => {
|
||||
response.send(require('./json/transport/tral-numbers/success.json'))
|
||||
})
|
||||
|
||||
router.get('/getEvents', (request, response) => {
|
||||
response.send(require('./json/transport/events-calendar/success.json'))
|
||||
})
|
||||
|
||||
router.get('/getTripSchedule', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/transport/trip-schedule/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// History page
|
||||
router.get('/getHistoryText', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/history/text/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
router.get('/getHistoryList', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/history/list/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Education page
|
||||
router.get('/getInfoAboutEducation', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/education/text/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
router.get('/getEducationList', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/education/cards/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
router.get('/getInfoAboutKFU', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/education/kfu/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// Login
|
||||
router.post('/entrance', (request, response) => {
|
||||
const { email, password } = request.body.entranceData;
|
||||
|
||||
try {
|
||||
const users = require('./json/users-information/success.json');
|
||||
const user = users.data.find(user => user.email === email && user.password === password);
|
||||
|
||||
if (!user) {
|
||||
return response.status(401).send('Неверные учетные данные');
|
||||
}
|
||||
|
||||
const responseObject = {
|
||||
email: user.email,
|
||||
}
|
||||
|
||||
return response.json(responseObject);
|
||||
} catch (error) {
|
||||
console.error('Ошибка чтения файла:', error);
|
||||
response.status(500).send('Внутренняя ошибка сервера');
|
||||
}
|
||||
})
|
||||
|
||||
router.post('/registration', async (request, response) => {
|
||||
const { email, password, confirmPassword } = request.body.registerData;
|
||||
|
||||
try {
|
||||
if (password !== confirmPassword) {
|
||||
return response.status(400).send('Пароли не совпадают!');
|
||||
}
|
||||
const users = require('./json/users-information/success.json');
|
||||
|
||||
const existingUser = users.data.find(user => user.email === email);
|
||||
|
||||
if (existingUser) {
|
||||
return response.status(400).send('Пользователь с такой почтой уже существует!');
|
||||
}
|
||||
|
||||
return response.json({ email: email });
|
||||
} catch (error) {
|
||||
console.error('Ошибка регистрации пользователя:', error);
|
||||
response.status(500).send('Внутренняя ошибка сервера');
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
const router = require('express').Router();
|
||||
const { expressjwt } = require('express-jwt')
|
||||
const axios = require('axios');
|
||||
const jwt = require('jsonwebtoken')
|
||||
const { ResultsModel } = require('./model/results')
|
||||
const { TOKEN_KEY } = require('./const')
|
||||
|
||||
// First page
|
||||
router.get('/getInfoAboutKazan', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/first/info-about-kazan/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(500).send({ message: 'Internal server error' });
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/getServices', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/first/services/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/getNews', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/first/news/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Sport page
|
||||
router.get('/getFirstText', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/sport/first-text/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/getSecondText', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/sport/second-text/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/getSportData', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/sport/sport-list/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/getSportQuiz', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/sport/quiz/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Places page
|
||||
router.get('/getPlacesData', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/places/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Transport page
|
||||
router.get('/getInfoAboutTransportPage', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/transport/info-about-page/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/getBus', (request, response) => {
|
||||
response.send(require('./json/transport/bus-numbers/success.json'))
|
||||
})
|
||||
|
||||
router.get('/getTral', (request, response) => {
|
||||
response.send(require('./json/transport/tral-numbers/success.json'))
|
||||
})
|
||||
|
||||
router.get('/getEvents', (request, response) => {
|
||||
response.send(require('./json/transport/events-calendar/success.json'))
|
||||
})
|
||||
|
||||
router.get('/getTripSchedule', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/transport/trip-schedule/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// History page
|
||||
router.get('/getHistoryText', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/history/text/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
router.get('/getHistoryList', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/history/list/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
// Education page
|
||||
router.get('/getInfoAboutEducation', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/education/text/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
router.get('/getEducationList', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require(`./json/education/cards/${lang}/success.json`);
|
||||
response.send(data);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
router.get('/getInfoAboutKFU', (request, response) => {
|
||||
const lang = request.query.lang || 'ru';
|
||||
try {
|
||||
const data = require('./json/education/kfu/success.json');
|
||||
const translatedData = data[lang] || data['ru'];
|
||||
response.send(translatedData);
|
||||
} catch (error) {
|
||||
response.status(404).send({ message: 'Language not found' });
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// Login
|
||||
router.post('/entrance', (request, response) => {
|
||||
const { email, password } = request.body.entranceData;
|
||||
|
||||
try {
|
||||
const users = require('./json/users-information/success.json');
|
||||
const user = users.data.find(user => user.email === email && user.password === password);
|
||||
|
||||
if (!user) {
|
||||
return response.status(401).send('Неверные учетные данные');
|
||||
}
|
||||
|
||||
const responseObject = {
|
||||
email: user.email,
|
||||
}
|
||||
|
||||
return response.json(responseObject);
|
||||
} catch (error) {
|
||||
console.error('Ошибка чтения файла:', error);
|
||||
response.status(500).send('Внутренняя ошибка сервера');
|
||||
}
|
||||
})
|
||||
|
||||
router.post('/registration', async (request, response) => {
|
||||
const { email, password, confirmPassword } = request.body.registerData;
|
||||
|
||||
try {
|
||||
if (password !== confirmPassword) {
|
||||
return response.status(400).send('Пароли не совпадают!');
|
||||
}
|
||||
const users = require('./json/users-information/success.json');
|
||||
|
||||
const existingUser = users.data.find(user => user.email === email);
|
||||
|
||||
if (existingUser) {
|
||||
return response.status(400).send('Пользователь с такой почтой уже существует!');
|
||||
}
|
||||
|
||||
return response.json({ email: email });
|
||||
} catch (error) {
|
||||
console.error('Ошибка регистрации пользователя:', error);
|
||||
response.status(500).send('Внутренняя ошибка сервера');
|
||||
}
|
||||
});
|
||||
|
||||
router.post('/signin', async (req, res) => {
|
||||
const { user } = req.body
|
||||
|
||||
if (!user || !user.token) {
|
||||
return res.status(404).json({error : "No user found"});
|
||||
}
|
||||
|
||||
const valRes = await axios.get('https://antd-table-v2-backend.onrender.com/api/auth/check',
|
||||
{
|
||||
headers: {
|
||||
'authorization': `Bearer ${user.token}`
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
if (valRes.status !== 200) {
|
||||
return res.status(401).json({error : "User authorization error"});
|
||||
}
|
||||
|
||||
const accessToken = jwt.sign({
|
||||
...JSON.parse(JSON.stringify(user._id)),
|
||||
}, TOKEN_KEY, {
|
||||
expiresIn: '12h'
|
||||
})
|
||||
user.token = accessToken;
|
||||
res.json(user)
|
||||
})
|
||||
|
||||
router.use(
|
||||
expressjwt({
|
||||
secret: TOKEN_KEY,
|
||||
algorithms: ['HS256'],
|
||||
getToken: function fromHeaderOrQuerystring(req) {
|
||||
if (req.headers.authorization && req.headers.authorization.split(" ")[0] === "Bearer")
|
||||
return req.headers.authorization.split(" ")[1];
|
||||
else if (req.query && req.query.token)
|
||||
return req.query.token;
|
||||
|
||||
return null;
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
router.get('/getQuizResults/:userId', async (request, response) => {
|
||||
const { userId } = request.params;
|
||||
|
||||
try {
|
||||
const results = await ResultsModel.findOne({ userId: userId }).exec();
|
||||
|
||||
if (!results)
|
||||
return response.status(404).send({ message: 'Quiz results not found' });
|
||||
|
||||
response.send(results.items);
|
||||
} catch (error) {
|
||||
response.status(500).send({ message: 'An error occurred while fetching quiz results' });
|
||||
}
|
||||
});
|
||||
|
||||
router.post('/addQuizResult', async (request, response) => {
|
||||
const { userId, quizId, result } = request.body;
|
||||
|
||||
if (!userId || !quizId || !result)
|
||||
return response.status(400).send({ message: 'Invalid input data' });
|
||||
|
||||
try {
|
||||
let userResults = await ResultsModel.findOne({ userId: userId }).exec();
|
||||
if (!userResults) {
|
||||
userResults = new ResultsModel({ userId, items: [] });
|
||||
}
|
||||
const itemToOverride = userResults.items.find(item => item.quizId === quizId)
|
||||
if (!itemToOverride) {
|
||||
userResults.items.push({ quizId, result });
|
||||
}
|
||||
else {
|
||||
itemToOverride.result = result;
|
||||
}
|
||||
|
||||
await userResults.save();
|
||||
|
||||
response.status(200).send({ message: 'Quiz result added successfully' });
|
||||
} catch (error) {
|
||||
response.status(500).send({ message: 'An error occurred while adding quiz result' });
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
102
server/routers/kazan-explore/json/first/services/en/success.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"banks": [
|
||||
{
|
||||
"name": "Sberbank of Russia",
|
||||
"description": "One of the largest and most popular banks in Russia. There are many branches and ATMs in Kazan. Sberbank offers a wide range of services, including loans, deposits, insurance, business services, and online banking."
|
||||
},
|
||||
{
|
||||
"name": "VTB",
|
||||
"description": "The second largest bank in Russia, with many offices and ATMs in Kazan. VTB offers various financial products for individuals and businesses, including loans, deposits, investment solutions, and cards."
|
||||
},
|
||||
{
|
||||
"name": "Tinkoff Bank",
|
||||
"description": "Although Tinkoff does not have traditional offices in Kazan, its products and services are available in the city through online banking and remote services. Tinkoff offers favorable terms for credit cards, deposits, and services for small and medium-sized businesses."
|
||||
},
|
||||
{
|
||||
"name": "Alfa-Bank",
|
||||
"description": "One of the largest private banks in Russia, with offices in Kazan. Alfa-Bank offers standard banking services such as loans, deposits, cards, as well as investment and insurance products."
|
||||
},
|
||||
{
|
||||
"name": "Rosselkhozbank",
|
||||
"description": "Rosselkhozbank is also present in Kazan, specializing in servicing the agro-industrial complex, but also provides services for individuals and businesses, including loans, deposits, and cards."
|
||||
},
|
||||
{
|
||||
"name": "RBC Bank",
|
||||
"description": "A Russian bank with several offices and ATMs in Kazan. It offers loans, cards, deposits, and business services."
|
||||
},
|
||||
{
|
||||
"name": "Bank Saint Petersburg",
|
||||
"description": "A local bank that also provides services in Kazan. It offers a wide range of banking products for individuals and businesses."
|
||||
}
|
||||
],
|
||||
"hospitals": [
|
||||
{
|
||||
"name": "Kazan City Clinical Hospital No. 1",
|
||||
"description": "One of the largest multidisciplinary hospitals in Kazan, offering services in surgery, traumatology, neurology, cardiology, and other medical fields. Modern technologies and highly qualified staff."
|
||||
},
|
||||
{
|
||||
"name": "Republican Clinical Hospital",
|
||||
"description": "The main medical organization of the Republic of Tatarstan, providing a wide range of services for adults and children, including emergency care, high-tech surgeries, and diagnostics."
|
||||
},
|
||||
{
|
||||
"name": "City Hospital No. 7",
|
||||
"description": "A hospital specializing in providing medical care in therapeutic, surgical, and resuscitation medicine. The hospital employs experienced specialists and uses modern treatment methods."
|
||||
},
|
||||
{
|
||||
"name": "Kazan Children's Clinical Hospital",
|
||||
"description": "A specialized medical facility for children, providing services for the treatment of diseases related to pediatrics, surgery, cardiology, and other fields for children of all ages."
|
||||
},
|
||||
{
|
||||
"name": "Kazan Oncology Dispensary",
|
||||
"description": "A medical institution specializing in the treatment of oncological diseases. It uses the latest methods of cancer diagnosis and treatment, including chemotherapy, radiotherapy, and surgical interventions."
|
||||
},
|
||||
{
|
||||
"name": "City Hospital No. 18",
|
||||
"description": "A multidisciplinary medical institution offering treatment in various medical fields, including traumatology, neurology, and cardiology. The hospital has a rehabilitation department for patients recovering from serious diseases."
|
||||
},
|
||||
{
|
||||
"name": "Republican Hospital for War Veterans",
|
||||
"description": "A medical institution providing specialized care for World War II veterans, disabled individuals, and elderly people. It also offers a wide range of services for citizens with chronic diseases."
|
||||
}
|
||||
],
|
||||
"pharmacies": [
|
||||
{
|
||||
"name": "Apteka 36.6",
|
||||
"description": "A pharmacy chain with a wide range of medications, vitamins, cosmetics, and health products. Loyalty programs and online orders for customer convenience."
|
||||
},
|
||||
{
|
||||
"name": "Rigla",
|
||||
"description": "One of the largest pharmacy chains in Russia. It offers a wide range of medicines, medical products, and cosmetics. It also provides the option to order online."
|
||||
},
|
||||
{
|
||||
"name": "Zdorovaya Semya",
|
||||
"description": "A pharmacy chain focused on the sale of medicines and health products, including medical equipment. Often runs promotions and discounts on popular items."
|
||||
},
|
||||
{
|
||||
"name": "A5 Pharmacy Chain",
|
||||
"description": "Pharmacies offering a wide range of products, including medicines, vitamins, cosmetics, and children's products. Convenient delivery and online order services."
|
||||
},
|
||||
{
|
||||
"name": "Samson-Pharma Pharmacy",
|
||||
"description": "A pharmacy chain offering customers all necessary medicines and health products. Pharmacies offer various discount and bonus programs for regular customers."
|
||||
},
|
||||
{
|
||||
"name": "Tsvetnoy Pharmacy Chain",
|
||||
"description": "Pharmacies known for their convenient locations and high-quality service. They sell medicines, vitamins, self-care products, and medical equipment."
|
||||
},
|
||||
{
|
||||
"name": "Doctor Stoletev Pharmacy",
|
||||
"description": "A pharmacy chain focused on selling pharmaceutical products, medical goods, and cosmetics. Convenient service and promotions for customers."
|
||||
}
|
||||
],
|
||||
"airports": [
|
||||
{
|
||||
"name": "Kazan International Airport",
|
||||
"description": "The main airport of the city of Kazan, serving international and domestic flights. The airport is equipped with modern terminals, comfortable waiting areas, shops, and restaurants. It is one of the largest in the Volga region and an important transport hub for Tatarstan."
|
||||
},
|
||||
{
|
||||
"name": "Kazan-2 (when it was operational)",
|
||||
"description": "Previously used for domestic flights and military needs. It is no longer fully operational as all passenger flights have been redirected to Kazan International Airport. The airport building is closed for commercial air traffic."
|
||||
}
|
||||
]
|
||||
}
|
||||
102
server/routers/kazan-explore/json/first/services/ru/success.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"banks": [
|
||||
{
|
||||
"name": "Сбербанк России",
|
||||
"description": "Один из крупнейших и самых популярных банков в России. В Казани есть множество отделений и банкоматов. Сбербанк предлагает широкий спектр услуг, включая кредиты, депозиты, страхование, обслуживание бизнеса и онлайн-банкинг."
|
||||
},
|
||||
{
|
||||
"name": "ВТБ",
|
||||
"description": "Второй по величине банк в России, с большим количеством офисов и банкоматов в Казани. ВТБ предлагает различные финансовые продукты для физических и юридических лиц, включая кредиты, вклады, инвестиционные решения и карты."
|
||||
},
|
||||
{
|
||||
"name": "Тинькофф Банк",
|
||||
"description": "Несмотря на то что у Тинькофф нет традиционных офисов в Казани, его продукты и услуги доступны в городе через онлайн-банкинг и удаленное обслуживание. Тинькофф предлагает выгодные условия по кредитным картам, вклады, а также услуги для малого и среднего бизнеса."
|
||||
},
|
||||
{
|
||||
"name": "Альфа-Банк",
|
||||
"description": "Один из крупных частных банков в России, с офисами в Казани. Альфа-Банк предлагает стандартные банковские услуги, такие как кредиты, депозиты, карты, а также инвестиционные и страховые продукты."
|
||||
},
|
||||
{
|
||||
"name": "Россельхозбанк",
|
||||
"description": "В Казани также присутствует Россельхозбанк, специализирующийся на обслуживании агропромышленного комплекса, но также предоставляет услуги для физических и юридических лиц, включая кредиты, депозиты и карты."
|
||||
},
|
||||
{
|
||||
"name": "РБК Банк",
|
||||
"description": "Российский банк с рядом офисов и банкоматов в Казани. Предлагает кредиты, карты, депозиты, а также обслуживание для бизнеса."
|
||||
},
|
||||
{
|
||||
"name": "Банк Санкт-Петербург",
|
||||
"description": "Местный банк, который также предоставляет услуги в Казани. Предлагает широкий выбор банковских продуктов для частных лиц и бизнеса."
|
||||
}
|
||||
],
|
||||
"hospitals": [
|
||||
{
|
||||
"name": "Казанская городская клиническая больница №1",
|
||||
"description": "Одна из крупнейших многопрофильных больниц Казани, предлагающая услуги в области хирургии, травматологии, неврологии, кардиологии и других медицинских направлений. Современные технологии и высококвалифицированный персонал."
|
||||
},
|
||||
{
|
||||
"name": "Республиканская клиническая больница",
|
||||
"description": "Основная медицинская организация Республики Татарстан, предоставляющая широкий спектр услуг для взрослых и детей, включая экстренную помощь, высокотехнологичные операции и диагностику."
|
||||
},
|
||||
{
|
||||
"name": "Городская больница №7",
|
||||
"description": "Больница, специализирующаяся на оказании медицинской помощи в области терапевтической, хирургической и реанимационной медицины. В больнице работают опытные специалисты, используемые современные методы лечения."
|
||||
},
|
||||
{
|
||||
"name": "Казанская детская клиническая больница",
|
||||
"description": "Профильное медицинское учреждение для детей, которое предоставляет услуги по лечению заболеваний, связанных с педиатрией, хирургией, кардиологией и другими направлениями для детей всех возрастов."
|
||||
},
|
||||
{
|
||||
"name": "Казанский онкологический диспансер",
|
||||
"description": "Медицинское учреждение, специализирующееся на лечении онкологических заболеваний. Использует новейшие методы диагностики и лечения рака, включая химиотерапию, радиотерапию и операционные вмешательства."
|
||||
},
|
||||
{
|
||||
"name": "Городская больница №18",
|
||||
"description": "Многопрофильное медицинское учреждение, предлагающее лечение в различных областях медицины, включая травматологию, неврологию и кардиологию. В больнице есть отделение для реабилитации пациентов после тяжелых заболеваний."
|
||||
},
|
||||
{
|
||||
"name": "Республиканская больница для ветеранов войн",
|
||||
"description": "Медицинское учреждение, оказывающее специализированную помощь ветеранам Великой Отечественной войны, инвалидам и пожилым людям. Также предлагает широкий спектр услуг для граждан с хроническими заболеваниями."
|
||||
}
|
||||
],
|
||||
"pharmacies": [
|
||||
{
|
||||
"name": "Аптека 36,6",
|
||||
"description": "Сеть аптек с большим ассортиментом лекарственных средств, витаминов, косметики и товаров для здоровья. Программы лояльности и онлайн-заказы для удобства клиентов."
|
||||
},
|
||||
{
|
||||
"name": "Ригла",
|
||||
"description": "Одна из крупнейших аптечных сетей в России. Предлагает широкий выбор лекарств, медицинских товаров и косметики. Также предоставляет возможность заказа через интернет."
|
||||
},
|
||||
{
|
||||
"name": "Здоровая семья",
|
||||
"description": "Аптечная сеть, ориентированная на продажу лекарств и товаров для здоровья, включая медицинскую технику. Часто проводятся акции и скидки на популярные товары."
|
||||
},
|
||||
{
|
||||
"name": "Аптечная сеть 'А5'",
|
||||
"description": "Аптеки, предлагающие широкий ассортимент товаров, включая лекарства, витамины, косметику и товары для детей. Удобные услуги доставки и онлайн-заказов."
|
||||
},
|
||||
{
|
||||
"name": "Аптека 'Самсон-Фарма'",
|
||||
"description": "Сеть аптек, предоставляющая клиентам все необходимые лекарства и товары для здоровья. Аптеки предлагают различные программы скидок и бонусов для постоянных клиентов."
|
||||
},
|
||||
{
|
||||
"name": "Аптечная сеть 'Цветной'",
|
||||
"description": "Аптеки, известные своими удобными местоположениями и качественным обслуживанием. В продаже лекарства, витамины, товары для ухода за собой и медтехника."
|
||||
},
|
||||
{
|
||||
"name": "Аптека 'Доктор Столетов'",
|
||||
"description": "Сеть аптек, ориентированная на продажу фармацевтической продукции, медицинских товаров и косметики. Удобный сервис и акции для клиентов."
|
||||
}
|
||||
],
|
||||
"airports": [
|
||||
{
|
||||
"name": "Международный аэропорт Казань",
|
||||
"description": "Главный аэропорт города Казани, обслуживающий международные и внутренние рейсы. Аэропорт оснащен современными терминалами, удобными зонами ожидания, магазинами и ресторанами. Он является одним из крупнейших в Поволжье и важным транспортным узлом для Татарстана."
|
||||
},
|
||||
{
|
||||
"name": "Казань-2 (когда был действующим)",
|
||||
"description": "Ранее используемый аэропорт для внутренних рейсов и военных нужд. В настоящее время не функционирует в полном объеме, поскольку все пассажирские рейсы перенаправлены в Международный аэропорт Казань. Здание аэропорта закрыто для коммерческих авиаперевозок."
|
||||
}
|
||||
]
|
||||
}
|
||||
102
server/routers/kazan-explore/json/first/services/tt/success.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"banks": [
|
||||
{
|
||||
"name": "Россия Сбербанкы",
|
||||
"description": "Россиядәге иң зур һәм популяр банкларның берсе. Казан шәһәрендә күпсанлы бүлекләр һәм банкоматлар бар. Сбербанк киң спектрлы хезмәтләр тәкъдим итә, шул исәптән кредитлар, депозиты, иминиятләштерү, бизнеска хезмәт күрсәтү һәм онлайн-банкчылык."
|
||||
},
|
||||
{
|
||||
"name": "ВТБ",
|
||||
"description": "Россиядә икенче зурлыктагы банк, Казан шәһәрендә күп санлы офислар һәм банкоматлар белән. ВТБ физик һәм юридик затлар өчен төрле финанс продуктларын тәкъдим итә, шул исәптән кредитлар, депозитлар, инвестицион чишелешләр һәм карталар."
|
||||
},
|
||||
{
|
||||
"name": "Тинькофф Банк",
|
||||
"description": "Тинькофф Казан шәһәрендә традицион офисларга ия булмаса да, аның продуктлары һәм хезмәтләре шәһәрдә онлайн-банкчылык һәм ерак хезмәт күрсәтү аша тәкъдим ителә. Тинькофф кредит карталары, депозитлар, шулай ук кечкенә һәм урта бизнес өчен хезмәтләр тәкъдим итә."
|
||||
},
|
||||
{
|
||||
"name": "Альфа-Банк",
|
||||
"description": "Россиядәге зур шәхси банкларның берсе, Казанда офислары белән. Альфа-Банк стандарт банк хезмәтләрен тәкъдим итә, шул исәптән кредитлар, депозитлар, карталар, шулай ук инвестицион һәм иминият продуктлары."
|
||||
},
|
||||
{
|
||||
"name": "Россельхозбанк",
|
||||
"description": "Казан шәһәрендә Россельхозбанк та бар, ул агропромышленность өлкәсендә хезмәт күрсәтүгә махсуслашкан, ләкин шулай ук физик һәм юридик затлар өчен хезмәтләр тәкъдим итә, шул исәптән кредитлар, депозитлар һәм карталар."
|
||||
},
|
||||
{
|
||||
"name": "РБК Банк",
|
||||
"description": "Казан шәһәрендә офислары һәм банкоматлары булган Россия банкы. Кредитлар, карталар, депозитлар һәм бизнеска хезмәт күрсәтү тәкъдим итә."
|
||||
},
|
||||
{
|
||||
"name": "Санкт-Петербург Банкы",
|
||||
"description": "Казан шәһәрендә дә хезмәт күрсәткән җирле банк. Ул шәхси затлар һәм бизнес өчен киң банк продуктлары сайлау тәкъдим итә."
|
||||
}
|
||||
],
|
||||
"hospitals": [
|
||||
{
|
||||
"name": "Казан шәһәр клиник хастаханәсе №1",
|
||||
"description": "Казанның иң зур күппрофильле хастаханәләренең берсе, хирургия, травматология, неврология, кардиология һәм башка медицина юнәлешләре буенча хезмәтләр тәкъдим итә. Замана технологияләре һәм югары квалификацияле персонал."
|
||||
},
|
||||
{
|
||||
"name": "Республиканың клиник хастаханәсе",
|
||||
"description": "Татарстан Республикасы өчен төп медицина оешмасы, зур спектрдагы хезмәтләрне тәкъдим итә, шул исәптән ашыгыч ярдәм, югары технологияле операцияләр һәм диагностика."
|
||||
},
|
||||
{
|
||||
"name": "Шәһәр хастаханәсе №7",
|
||||
"description": "Терапевтик, хирургик һәм реанимация медицинасы өлкәсендә медицина ярдәме күрсәтүгә махсуслашкан хастаханә. Хастаханәдә тәҗрибәле белгечләр эшли, заманча дәвалау ысуллары кулланыла."
|
||||
},
|
||||
{
|
||||
"name": "Казан балалар клиник хастаханәсе",
|
||||
"description": "Балалар өчен профильле медицина учреждениесе, педиатрия, хирургия, кардиология һәм башка юнәлешләр буенча хезмәтләр тәкъдим итә."
|
||||
},
|
||||
{
|
||||
"name": "Казан онкология диспансеры",
|
||||
"description": "Онкологик авыруларны дәвалауга махсуслашкан медицина учреждениесе. Рак диагнозын һәм дәвалауны үткәрүдә заманча ысуллар кулланыла, шул исәптән химиотерапия, радиотерапия һәм операцияләр."
|
||||
},
|
||||
{
|
||||
"name": "Шәһәр хастаханәсе №18",
|
||||
"description": "Күппрофильле медицина учреждениесе, төрле медицина өлкәләрендә дәвалау тәкъдим итә, шул исәптән травматология, неврология һәм кардиология. Хастаханәдә авыр авырулардан соң реабилитация бүлекләре бар."
|
||||
},
|
||||
{
|
||||
"name": "Ветераннар өчен республика хастаханәсе",
|
||||
"description": "Бөек Ватан сугышы ветераннарына, инвалидларга һәм картларга махсус медицина ярдәме күрсәтүче учреждение. Шулай ук хроник авырулары булган гражданнар өчен хезмәтләр тәкъдим итә."
|
||||
}
|
||||
],
|
||||
"pharmacies": [
|
||||
{
|
||||
"name": "Аптека 36,6",
|
||||
"description": "Дәреслекләр, витаминнар, косметика һәм сәламәтлек товарларының киң ассортименты булган аптека челтәре. Лояльлек программалары һәм онлайн-заказлар клиентлар өчен уңайлы."
|
||||
},
|
||||
{
|
||||
"name": "Ригла",
|
||||
"description": "Россиядәге иң зур аптекалар челтәрләренең берсе. Дәреслекләр, медицина товарлары һәм косметика тәкъдим итә. Шулай ук интернет аша заказ бирү мөмкинлеге бар."
|
||||
},
|
||||
{
|
||||
"name": "Здоровая семья",
|
||||
"description": "Дәреслекләр һәм сәламәтлек товарлары, шул исәптән медицина техникасы сатуга юнәлдерелгән аптека челтәре. Популяр товарларга акцияләр һәм ташламалар еш үткәрелә."
|
||||
},
|
||||
{
|
||||
"name": "Аптечная сеть 'А5'",
|
||||
"description": "Дәреслекләр, витаминнар, косметика һәм балалар товарларының киң ассортименты булган аптека челтәре. Уңайлы җибәрү һәм онлайн-заказлар хезмәтләре."
|
||||
},
|
||||
{
|
||||
"name": "Аптека 'Самсон-Фарма'",
|
||||
"description": "Дәреслекләр һәм сәламәтлек товарлары тәкъдим итә торган аптека челтәре. Аптекалар даими клиентлар өчен скидкалар һәм бонуслар тәкъдим итә."
|
||||
},
|
||||
{
|
||||
"name": "Аптечная сеть 'Цветной'",
|
||||
"description": "Уңайлы урнашкан һәм сыйфатлы хезмәт күрсәтү белән танылган аптекалар. Дәреслекләр, витаминнар, үз-үзеңне карау товарлары һәм медицина техникасы сатыла."
|
||||
},
|
||||
{
|
||||
"name": "Аптека 'Доктор Столетов'",
|
||||
"description": "Фармацевтик продукция, медицина товарлары һәм косметика сату белән шөгыльләнгән аптека челтәре. Уңайлы хезмәт һәм клиентлар өчен акцияләр."
|
||||
}
|
||||
],
|
||||
"airports": [
|
||||
{
|
||||
"name": "Казан Халыкара Аэропорты",
|
||||
"description": "Казанның төп аэропорты, халыкара һәм эчке рейсларны башкаручы. Аэропорт заманча терминаллар, уңайлы көтү зоналары, кибетләр һәм рестораннар белән җиһазландырылган. Ул Поволжье төбәгендә иң зур аэропортларның берсе һәм Татарстан өчен мөһим транспорт узелы."
|
||||
},
|
||||
{
|
||||
"name": "Казан-2 (эшләгән вакытта)",
|
||||
"description": "Элекке эчке рейслар һәм хәрби кирәклекләр өчен кулланылган аэропорт. Хәзерге вакытта тулы көченә эшләми, чөнки барлык пассажир рейслары Казан Халыкара Аэропортына күчерелгән. Аэропорт бинасы коммерция авиаперевозкалары өчен ябык."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -788,5 +788,121 @@
|
||||
"image_url": "w_six"
|
||||
}
|
||||
]
|
||||
},
|
||||
"history": {
|
||||
"intro_text": "Let's see how well you know UNICS!",
|
||||
"intro_image": "culture",
|
||||
"questions": [
|
||||
{
|
||||
"question": "When was Kazan founded?",
|
||||
"options": [
|
||||
"1005",
|
||||
"1156",
|
||||
"1230",
|
||||
"1323"
|
||||
],
|
||||
"correct_answer": "1005",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "What is the main river flowing through Kazan?",
|
||||
"options": [
|
||||
"Volga",
|
||||
"Kazanka",
|
||||
"Kama",
|
||||
"Izh"
|
||||
],
|
||||
"correct_answer": "Kazanka",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Who was the first khan of Kazan?",
|
||||
"options": [
|
||||
"Ulugh Muhammad",
|
||||
"Akhmat",
|
||||
"Shah Ali",
|
||||
"Mamuka"
|
||||
],
|
||||
"correct_answer": "Ulugh Muhammad",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "What is the name of Kazan's main sports complex where the 2013 Universiade was held?",
|
||||
"options": [
|
||||
"Kazan Arena",
|
||||
"Tatneft Arena",
|
||||
"Bugulma Arena",
|
||||
"Ak Bars Sports Palace"
|
||||
],
|
||||
"correct_answer": "Kazan Arena",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Which mosque in Kazan is considered one of the largest in Russia?",
|
||||
"options": [
|
||||
"Kul Sharif Mosque",
|
||||
"Mari El Mosque",
|
||||
"Aisha Mosque",
|
||||
"Imam Muhammad Mosque"
|
||||
],
|
||||
"correct_answer": "Kul Sharif Mosque",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "What is the name of the square where the Kazan Kremlin and Kul Sharif Mosque are located?",
|
||||
"options": [
|
||||
"Vakhitov Square",
|
||||
"Freedom Square",
|
||||
"Kremlin Square",
|
||||
"Revolution Square"
|
||||
],
|
||||
"correct_answer": "Kremlin Square",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "What symbol of Kazan is depicted on the city's coat of arms?",
|
||||
"options": [
|
||||
"Dragon",
|
||||
"Tiger",
|
||||
"Lion",
|
||||
"Eagle"
|
||||
],
|
||||
"correct_answer": "Dragon",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Who was the architect of the Kazan Kremlin?",
|
||||
"options": [
|
||||
"Ivan Zarudny",
|
||||
"Fyodor Benjamin",
|
||||
"Andrey Ushakov",
|
||||
"Yury Dashevsky"
|
||||
],
|
||||
"correct_answer": "Andrey Ushakov",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Which of these universities is located in Kazan?",
|
||||
"options": [
|
||||
"Moscow State University",
|
||||
"Kazan Federal University",
|
||||
"St. Petersburg Polytechnic University",
|
||||
"Novosibirsk State University"
|
||||
],
|
||||
"correct_answer": "Kazan Federal University",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "What is the name of the largest street in Kazan, which is also the center of the city's nightlife?",
|
||||
"options": [
|
||||
"Kremlin Street",
|
||||
"Bauman Street",
|
||||
"Pushkin Street",
|
||||
"Kayum Nasyri Street"
|
||||
],
|
||||
"correct_answer": "Bauman Street",
|
||||
"image_url": "culture"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -788,5 +788,121 @@
|
||||
"image_url": "w_six"
|
||||
}
|
||||
]
|
||||
},
|
||||
"history": {
|
||||
"intro_text": "Давайте узнаем, насколько вы хорошо знаете историю Казани!",
|
||||
"intro_image": "culture",
|
||||
"questions": [
|
||||
{
|
||||
"question": "Когда Казань была основана?",
|
||||
"options": [
|
||||
"1000 год",
|
||||
"1156 год",
|
||||
"1230 год",
|
||||
"1323 год"
|
||||
],
|
||||
"correct_answer": "1000 год",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Как называется главная река, протекающая через Казань?",
|
||||
"options": [
|
||||
"Волга",
|
||||
"Казанка",
|
||||
"Кама",
|
||||
"Иж"
|
||||
],
|
||||
"correct_answer": "Казанка",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Кто был первым казанским ханом?",
|
||||
"options": [
|
||||
"Улу-Мухаммед",
|
||||
"Ахмат",
|
||||
"Шах-Али",
|
||||
"Мамука"
|
||||
],
|
||||
"correct_answer": "Улу-Мухаммед",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Как называется главный спортивный комплекс Казани, где проводились Универсиада 2013 года?",
|
||||
"options": [
|
||||
"Казан Арена",
|
||||
"Татнефть Арена",
|
||||
"Бугульминская арена",
|
||||
"Дворец спорта \"Ак Барс\""
|
||||
],
|
||||
"correct_answer": "Казан Арена",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Какая мечеть в Казани считается одной из самых больших в России?",
|
||||
"options": [
|
||||
"Мечеть Кул Шариф",
|
||||
"Мечеть Марий Эл",
|
||||
"Мечеть Айша",
|
||||
"Мечеть имама Мухаммада"
|
||||
],
|
||||
"correct_answer": "Мечеть Кул Шариф",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Как называется площадь, на которой расположены Казанский Кремль и мечеть Кул Шариф?",
|
||||
"options": [
|
||||
"Площадь Вахитова",
|
||||
"Площадь Свободы",
|
||||
"Площадь Кремля",
|
||||
"Площадь Революции"
|
||||
],
|
||||
"correct_answer": "Площадь Кремля",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Какой символ Казани изображён на гербе города?",
|
||||
"options": [
|
||||
"Дракон",
|
||||
"Тигр",
|
||||
"Лев",
|
||||
"Орел"
|
||||
],
|
||||
"correct_answer": "Дракон",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Какой архитектор спроектировал Казанский Кремль?",
|
||||
"options": [
|
||||
"Иван Зарудный",
|
||||
"Фёдор Бенжамин",
|
||||
"Андрей Ушаков",
|
||||
"Юрий Дашевский"
|
||||
],
|
||||
"correct_answer": "Андрей Ушаков",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Какой из этих вузов находится в Казани?",
|
||||
"options": [
|
||||
"Московский государственный университет",
|
||||
"Казанский федеральный университет",
|
||||
"Санкт-Петербургский политехнический университет",
|
||||
"Новосибирский государственный университет"
|
||||
],
|
||||
"correct_answer": "Казанский федеральный университет",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Как называется крупнейшая в Казани улица, которая также является центром ночной жизни города?",
|
||||
"options": [
|
||||
"Кремлевская улица",
|
||||
"Баумана улица",
|
||||
"Пушкина улица",
|
||||
"Каюма Насыри улица"
|
||||
],
|
||||
"correct_answer": "Баумана улица",
|
||||
"image_url": "culture"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -788,5 +788,121 @@
|
||||
"image_url": "w_six"
|
||||
}
|
||||
]
|
||||
},
|
||||
"history": {
|
||||
"intro_text": "Әйдәгез, Казан тарихын белүегезне ачыклыйк!",
|
||||
"intro_image": "culture",
|
||||
"questions": [
|
||||
{
|
||||
"question": "Казан кайчан нигезләнгән?",
|
||||
"options": [
|
||||
"1000 ел",
|
||||
"1156 ел",
|
||||
"1230 ел",
|
||||
"1323 ел"
|
||||
],
|
||||
"correct_answer": "1000 ел",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Казан аша агучы төп елга ничек атала?",
|
||||
"options": [
|
||||
"Идел",
|
||||
"Казанка",
|
||||
"Кама",
|
||||
"Иж"
|
||||
],
|
||||
"correct_answer": "Казанка",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Казанның беренче ханы кем булган?",
|
||||
"options": [
|
||||
"Олуг Мөхәммәт",
|
||||
"Әхмәт",
|
||||
"Шаһ-Әли",
|
||||
"Мамука"
|
||||
],
|
||||
"correct_answer": "Олуг Мөхәммәт",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "2013 елда Универсиада узган Казанның төп спорт комплексы ничек атала?",
|
||||
"options": [
|
||||
"Казан Арена",
|
||||
"Татнефть Арена",
|
||||
"Бөгелмә Арена",
|
||||
"Ак Барс спорт сарае"
|
||||
],
|
||||
"correct_answer": "Казан Арена",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Казандагы иң зур мәчетләрнең берсе Россиядәге кайсысы?",
|
||||
"options": [
|
||||
"Кол Шәриф мәчете",
|
||||
"Марий Эл мәчете",
|
||||
"Айша мәчете",
|
||||
"Имам Мөхәммәт мәчете"
|
||||
],
|
||||
"correct_answer": "Кол Шәриф мәчете",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Казан Кремле һәм Кол Шәриф мәчете урнашкан мәйдан ничек атала?",
|
||||
"options": [
|
||||
"Вахитов мәйданы",
|
||||
"Ирек мәйданы",
|
||||
"Кремль мәйданы",
|
||||
"Революция мәйданы"
|
||||
],
|
||||
"correct_answer": "Кремль мәйданы",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Казан гербында кайсы символ сурәтләнгән?",
|
||||
"options": [
|
||||
"Аждаһа",
|
||||
"Юлбарыс",
|
||||
"Арслан",
|
||||
"Бүре"
|
||||
],
|
||||
"correct_answer": "Аждаһа",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Казан Кремленең архитекторын атагыз.",
|
||||
"options": [
|
||||
"Иван Зарудный",
|
||||
"Фёдор Бенжамин",
|
||||
"Андрей Ушаков",
|
||||
"Юрий Дашевский"
|
||||
],
|
||||
"correct_answer": "Андрей Ушаков",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Бу югары уку йортларының кайсысы Казанда урнашкан?",
|
||||
"options": [
|
||||
"Мәскәү дәүләт университеты",
|
||||
"Казан федераль университеты",
|
||||
"Санкт-Петербург политехник университеты",
|
||||
"Новосибирск дәүләт университеты"
|
||||
],
|
||||
"correct_answer": "Казан федераль университеты",
|
||||
"image_url": "culture"
|
||||
},
|
||||
{
|
||||
"question": "Казандагы иң зур урам ничек атала? Ул шулай ук шәһәрнең төнге тормыш үзәге булып тора.",
|
||||
"options": [
|
||||
"Кремль урамы",
|
||||
"Бауман урамы",
|
||||
"Пушкин урамы",
|
||||
"Каюм Насыйри урамы"
|
||||
],
|
||||
"correct_answer": "Бауман урамы",
|
||||
"image_url": "culture"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
27
server/routers/kazan-explore/model/results.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const { Schema, model } = require('mongoose')
|
||||
|
||||
const { KAZAN_EXPLORE_RESULTS_MODEL_NAME } = require('../const')
|
||||
|
||||
const schema = new Schema({
|
||||
userId: { type: String },
|
||||
items: [
|
||||
{
|
||||
quizId: { type: String },
|
||||
result: { type: Number }
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
schema.set('toJSON', {
|
||||
virtuals: true,
|
||||
versionKey: false,
|
||||
transform: function (doc, ret) {
|
||||
delete ret._id
|
||||
}
|
||||
})
|
||||
|
||||
schema.virtual('id').get(function () {
|
||||
return this._id.toHexString()
|
||||
})
|
||||
|
||||
exports.ResultsModel = model(KAZAN_EXPLORE_RESULTS_MODEL_NAME, schema)
|
||||
@@ -1,17 +1,12 @@
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"description": "10 часто используемых",
|
||||
"description": "1000 часто используемых",
|
||||
"imageFilename": "kart1.jpg"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"description": "10 слов в Data Science",
|
||||
"imageFilename": "kart1.jpg"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"description": "IT Basics Dictionary",
|
||||
"imageFilename": "kart1.jpg"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -146,130 +146,5 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"words": [
|
||||
{
|
||||
"id": 0,
|
||||
"word": "software",
|
||||
"translation": "программное обеспечение",
|
||||
"definition": "A collection of computer instructions that perform a specific task, typically for use by humans or machines.",
|
||||
"synonyms": ["код", "приложение", "управление программами"],
|
||||
"examples":
|
||||
[
|
||||
"I need to update the software on my new laptop.",
|
||||
"The company uses Windows as its operating system."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"word": "hardware",
|
||||
"translation": "железо",
|
||||
"definition": "Physical components of a computer that process information, including processors and storage devices.",
|
||||
"synonyms": ["equipment", "приборы", "оборудование"],
|
||||
"examples":
|
||||
[
|
||||
"The keyboard is part of the hardware on this device.",
|
||||
"They upgraded their router to improve internet speed."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"word": "network",
|
||||
"translation": "сети",
|
||||
"definition": "A system of interconnected devices that communicate with each other through data transmission over a networked medium.",
|
||||
"synonyms": ["трансляция", "коммуникации", "диалог"],
|
||||
"examples":
|
||||
[
|
||||
"We use the internet to connect our devices in the same area.",
|
||||
"The company relies on their internal network for data sharing."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"word": "algorithm",
|
||||
"translation": "алгоритм",
|
||||
"definition": "A set of instructions that a computer follows to solve a problem or achieve a specific task.",
|
||||
"synonyms": ["процесс", "схема", "текст"],
|
||||
"examples":
|
||||
[
|
||||
"The algorithm for sorting numbers is easy to follow.",
|
||||
"The new software includes an advanced algorithm."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"word": "encryption",
|
||||
"translation": "криптография",
|
||||
"definition": "A technique that transforms information into a secure form, making it unreadable without the appropriate key.",
|
||||
"synonyms": ["шифрование", "окрышение", "опциональное"],
|
||||
"examples":
|
||||
[
|
||||
"Our data is encrypted to ensure its privacy and security.",
|
||||
"I need to use an encryption program for my important documents."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"word": "debugging",
|
||||
"translation": "поиск и исправление ошибок",
|
||||
"definition": "The process of identifying and correcting errors or defects in a computer program.",
|
||||
"synonyms": ["исправление", "сканирование", "анализ"],
|
||||
"examples":
|
||||
[
|
||||
"I need to debug the code for this new project.",
|
||||
"We use automated tools to find bugs."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"word": "API",
|
||||
"translation": "интерфейс приложения",
|
||||
"definition": "A set of rules and protocols that enables communication between software applications, typically over a network.",
|
||||
"synonyms": ["серверное программирование", "функциональная структура"],
|
||||
"examples":
|
||||
[
|
||||
"We use the API for our mobile app to access data from the backend server.",
|
||||
"I need to write an API for connecting my devices to the internet."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"word": "virtual",
|
||||
"translation": "виртуальный",
|
||||
"definition": "A representation of a thing that does not exist physically but exists in digital form.",
|
||||
"synonyms": ["высокопроизводительный", "представление", "цифровой"],
|
||||
"examples":
|
||||
[
|
||||
"I use virtual reality to experience different environments.",
|
||||
"Our company offers virtual office spaces for remote work."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"word": "infrastructure",
|
||||
"translation": "инфраструктура",
|
||||
"definition": "The underlying systems and equipment of a computer network or organization, including hardware, software, and physical connections.",
|
||||
"synonyms": ["оборудование", "устройство", "системы"],
|
||||
"examples":
|
||||
[
|
||||
"Our IT infrastructure is robust to ensure reliable operations.",
|
||||
"They need to improve their internet infrastructure for better connectivity."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"word": "hacker",
|
||||
"translation": "хакер",
|
||||
"definition": "A skilled individual who uses computer technology to break into and misuse a system or network.",
|
||||
"synonyms": ["дезориентированный", "манипулятор", "прокурор"],
|
||||
"examples":
|
||||
[
|
||||
"I need to avoid getting involved with hackers.",
|
||||
"They were caught hacking into the company's confidential database."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const router = require("express").Router();
|
||||
|
||||
module.exports = router;
|
||||
@@ -11,59 +9,6 @@ router.get("/", (req, res) => {
|
||||
res.send(data);
|
||||
});
|
||||
|
||||
// Put new dictionary to the array of dictionaries
|
||||
router.put('/new', (req, res) => {
|
||||
if (!data || !Array.isArray(data)) {
|
||||
return res.status(400).send('No array of dictionaries found`');
|
||||
}
|
||||
|
||||
const updatedData = req.body;
|
||||
|
||||
if (!updatedData) {
|
||||
return res.status(400).send('No data to update'); // Bad request
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return res.status(500).send('No data to update'); // Internal server error
|
||||
}
|
||||
|
||||
const indexedUpdatedData = { id: data.length, ...updatedData }; // Add the new dictionary to the array
|
||||
|
||||
data.push(indexedUpdatedData); // Add the new dictionary to the array
|
||||
|
||||
fs.writeFile(path.join(__dirname, 'data/dictionaries.json'), JSON.stringify(data), (err) => {
|
||||
if (err) {
|
||||
console.error(err); // Log the error
|
||||
return res.status(500).send('Error saving data');
|
||||
}
|
||||
res.status(200).json(data); // Send back the updated data
|
||||
});
|
||||
});
|
||||
|
||||
router.delete('/:id', (req, res) => {
|
||||
const id = parseInt(req.params.id); // Get the dictionary id from the URL
|
||||
|
||||
if (!id || isNaN(id)) {
|
||||
return res.status(400).send('Invalid ID'); // Bad request
|
||||
}
|
||||
|
||||
const index = data.findIndex((dictionary) => dictionary.id === id);
|
||||
|
||||
if (index < 0) {
|
||||
return res.status(404).send('Not found'); // Not found
|
||||
}
|
||||
|
||||
data.splice(index, 1); // Remove the dictionary from the array
|
||||
|
||||
fs.writeFile(path.join(__dirname, 'data/dictionaries.json'), JSON.stringify(data), (err) => {
|
||||
if (err) {
|
||||
console.error(err); // Log the error
|
||||
return res.status(500).send('Error saving data');
|
||||
}
|
||||
res.send({ message: `Dictionary with id ${id} deleted` });
|
||||
});
|
||||
});
|
||||
|
||||
router.get("/:id", (req, res) => {
|
||||
const id = parseInt(req.params.id);
|
||||
const words = wordsData.find((word) => word.id === id);
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
const router = require("express").Router();
|
||||
|
||||
const dictionariesRouter = require("./dictionaries");
|
||||
const unitsRouter = require('./units');
|
||||
module.exports = router;
|
||||
|
||||
const delay =
|
||||
(ms = 250) =>
|
||||
(ms = 1000) =>
|
||||
(req, res, next) => {
|
||||
setTimeout(next, ms);
|
||||
};
|
||||
|
||||
router.use(delay());
|
||||
router.use("/dictionaries", dictionariesRouter);
|
||||
router.use('/units', unitsRouter);
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# Unit 1. Multifunctional Verbs: Be, Have, and Do
|
||||
|
||||
## Overview
|
||||
|
||||
This unit focuses on the use of multifunctional verbs in English. These verbs are able to express multiple meanings depending on their use in a sentence.
|
||||
|
||||
## Learning Objectives
|
||||
|
||||
By the end of this unit, you will be able to:
|
||||
|
||||
- Identify the different forms of the main multifunctional verb.
|
||||
- Explain how these forms can be used interchangeably in sentences.
|
||||
- Demonstrate the correct usage of the three forms of the multifunctional verb by providing sentences and examples.
|
||||
|
||||
## Vocabulary Review
|
||||
|
||||
| Term | Definition |
|
||||
| ---- | -------------------------------------------------------- |
|
||||
| Be | To express a present or ongoing state of being. |
|
||||
| Have | To express ownership or possession. |
|
||||
| Do | To express an action to be done, future action or habit. |
|
||||
|
||||
## Activities
|
||||
|
||||
### Activity 1: Identify the Different Forms of the Main Multifunctional Verb
|
||||
|
||||
- Read through each sentence and identify if the verb is used in its present tense (is), past tense (was/were), or future tense (will, would).
|
||||
- Discuss how this usage can vary depending on context.
|
||||
- Write down sentences that use different forms to illustrate your points.
|
||||
|
||||
1. **Sentence 1**: "The cat is sleeping."
|
||||
|
||||
- Present tense: The cat is sleeping.
|
||||
- Past tense: The cat slept.
|
||||
- Future tense: The cat will sleep.
|
||||
|
||||
2. **Sentence 2**: "I have a dog at home."
|
||||
|
||||
- Present tense: I have a dog.
|
||||
- Past tense: I had a dog.
|
||||
- Future tense: I will have a dog.
|
||||
|
||||
3. **Sentence 3**: "We are going on a hike tomorrow."
|
||||
|
||||
- Present tense: We are going on a hike.
|
||||
- Past tense: We went on a hike.
|
||||
- Future tense: We will go on a hike.
|
||||
|
||||
4. **Sentence 4**: "He has been studying all day."
|
||||
|
||||
- Present tense: He is studying.
|
||||
- Past tense: He studied.
|
||||
- Future tense: He will study.
|
||||
|
||||
5. **Sentence 5**: "We are going to buy some groceries later today."
|
||||
- Present tense: We are going to buy some groceries.
|
||||
- Past tense: We bought some groceries.
|
||||
- Future tense: We will buy some groceries.
|
||||
|
||||
### Activity 2: Explain How These Forms Can Be Used Interchangeably in Sentences
|
||||
|
||||
- Read through a sentence and identify the present, past, and future tense uses.
|
||||
- In pairs, explain why these forms are used interchangeably.
|
||||
- Provide examples of sentences that demonstrate this usage.
|
||||
- Highlight how the context changes the meaning.
|
||||
|
||||
### Activity 3: Correct Usage of the Three Forms of the Multifunctional Verb
|
||||
|
||||
- Read through a sentence and identify which form is being used.
|
||||
- In pairs, discuss why these forms are used in certain situations.
|
||||
- Provide sentences that demonstrate the correct usage of the three forms.
|
||||
@@ -1 +0,0 @@
|
||||
[{"id":0,"filename":"unit-1","name":"Unit 1: Multifunctional Verbs: Be, Have, and Do"}]
|
||||
@@ -1,58 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const router = require('express').Router();
|
||||
|
||||
module.exports = router;
|
||||
|
||||
const data = require('./data/units.json');
|
||||
router.get('/', (req, res) => {
|
||||
res.send(data);
|
||||
});
|
||||
|
||||
router.put('/', (req, res) => {
|
||||
const newUnit = req.body
|
||||
|
||||
if (!newUnit) {
|
||||
return res.status(400).send('No new unit to be added')
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return res.status(500).send('No data to be updated')
|
||||
}
|
||||
|
||||
data.push({ "id": data.length, ...newUnit })
|
||||
|
||||
fs.writeFileSync(path.join(__dirname, 'data', 'units.json'), JSON.stringify(data));
|
||||
res.status(200).send(data);
|
||||
});
|
||||
|
||||
router.delete('/:id', (req, res) => {
|
||||
const id = parseInt(req.params.id);
|
||||
const index = data.findIndex((unit) => unit.id === id);
|
||||
|
||||
if (index < 0) {
|
||||
return res.status(404).send('Not found');
|
||||
}
|
||||
|
||||
data.splice(index, 1);
|
||||
fs.writeFileSync(path.join(__dirname, 'data', 'units.json'), JSON.stringify(data));
|
||||
res.send({ message: `Unit with ID ${id} deleted` });
|
||||
});
|
||||
|
||||
router.get('/:id', (req, res) => {
|
||||
const id = parseInt(req.params.id);
|
||||
const unit = data.find((unit) => unit.id === id);
|
||||
|
||||
if (!unit) {
|
||||
return res.status(404).send('Not found');
|
||||
}
|
||||
|
||||
const unitFilepath = path.join(__dirname, 'data', `${unit.filename}.md`);
|
||||
const unitContent = fs.readFileSync(unitFilepath, 'utf-8');
|
||||
|
||||
if (!unitContent) {
|
||||
return res.status(404).send('Not found');
|
||||
}
|
||||
|
||||
res.send({ ...unit, content: unitContent });
|
||||
});
|
||||
@@ -2,7 +2,6 @@ const { Router } = require('express')
|
||||
const router = Router()
|
||||
|
||||
router.use('/eng-it-lean', require('./eng-it-lean/index'))
|
||||
router.use('/sberhubproject', require('./sberhubproject/index'))
|
||||
|
||||
module.exports = router
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
const router = require('express').Router();
|
||||
const interestsRouter = require('./interests');
|
||||
const usersRouter = require('./users');
|
||||
module.exports = router;
|
||||
|
||||
|
||||
const delay =
|
||||
(ms = 1000) =>
|
||||
(req, res, next) => {
|
||||
setTimeout(next, ms);
|
||||
};
|
||||
|
||||
|
||||
router.use(delay());
|
||||
router.use('/interests', interestsRouter);
|
||||
router.use('/users', usersRouter);
|
||||
router.use('/users/:id', usersRouter);
|
||||
@@ -1,19 +0,0 @@
|
||||
[
|
||||
{"value":"Стартапы, поиск команды и нетворкинг", "label":"Стартапы, поиск команды и нетворкинг"},
|
||||
{"value":"Искусство, фотография и дизайн", "label":"Искусство, фотография и дизайн"},
|
||||
{"value":"Музыка", "label":"Музыка"},
|
||||
{"value":"Хореография", "label":"Хореография"},
|
||||
{"value":"Спорт, фитнес и ЗОЖ", "label":"Спорт, фитнес и ЗОЖ"},
|
||||
{"value":"Литература и история", "label":"Литература и история"},
|
||||
{"value":"Политика, социология, активизм и дебаты", "label":"Политика, социология, активизм и дебаты"},
|
||||
{"value":"Кино и другое многомодальное искусство", "label":"Кино и другое многомодальное искусство"},
|
||||
{"value":"Психология и психическое здоровье", "label":"Психология и психическое здоровье"},
|
||||
{"value":"Соревновательные видеоигры", "label":"Соревновательные видеоигры"},
|
||||
{"value":"Новые технологии, ИИ, техника", "label":"Новые технологии, ИИ, техника"},
|
||||
{"value":"Математика, физика и информатика", "label":"Математика, физика и информатика"},
|
||||
{"value" :"Волонтерство и благотворительность", "label": "Волонтерство и благотворительность"},
|
||||
{"value" :"Настольные игры", "label": "Настольные игры"},
|
||||
{"value" :"Путешествия и туризм", "label": "Путешествия и туризм"},
|
||||
{"value" :"Английский (иностранные языки)", "label": "Английский (иностранные языки)"},
|
||||
{"value" :"Цифровые кафедры", "label": "Цифровые кафедры"}
|
||||
]
|
||||
@@ -1,12 +0,0 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
module.exports = router;
|
||||
|
||||
const data = require('./data/interest.json');
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
//res.status(500).send({
|
||||
// message: 'Internal server error'
|
||||
//});
|
||||
res.json(data)
|
||||
});
|
||||
@@ -1,113 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1252744945,
|
||||
"username": "Иван Иванов",
|
||||
"photo": "https://example.com/photos/1.jpg",
|
||||
"about": "Разработчик с 10-летним стажем, увлекаюсь новыми технологиями.",
|
||||
"email": "ivan.ivanov@example.com",
|
||||
"interests": [
|
||||
{ "value": "Новые технологии, ИИ, техника", "label": "Новые технологии, ИИ, техника" },
|
||||
{ "value": "Музыка", "label": "Музыка" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"username": "Мария Смирнова",
|
||||
"photo": "https://example.com/photos/2.jpg",
|
||||
"about": "Люблю путешествия и фотографию, обожаю изучать новые культуры.",
|
||||
"email": "maria.smirnova@example.com",
|
||||
"interests": [
|
||||
{ "value": "Путешествия и туризм", "label": "Путешествия и туризм" },
|
||||
{ "value": "Искусство, фотография и дизайн", "label": "Искусство, фотография и дизайн" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"username": "Алексей Кузнецов",
|
||||
"photo": "https://example.com/photos/3.jpg",
|
||||
"about": "Финансовый аналитик, интересуюсь инвестициями и рынками.",
|
||||
"email": "aleksey.kuznetsov@example.com",
|
||||
"interests": [
|
||||
{ "value": "Политика, социология, активизм и дебаты", "label": "Политика, социология, активизм и дебаты" },
|
||||
{ "value": "Математика, физика и информатика", "label": "Математика, физика и информатика" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"username": "Ольга Петрова",
|
||||
"photo": "https://example.com/photos/4.jpg",
|
||||
"about": "Дизайнер интерьеров, люблю создавать уютные и стильные пространства.",
|
||||
"email": "olga.petrovna@example.com",
|
||||
"interests": [
|
||||
{ "value": "Искусство, фотография и дизайн", "label": "Искусство, фотография и дизайн" },
|
||||
{ "value": "Кино и другое многомодальное искусство", "label": "Кино и другое многомодальное искусство" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"username": "Дмитрий Сидоров",
|
||||
"photo": "https://example.com/photos/5.jpg",
|
||||
"about": "Тренер по фитнесу, придерживаюсь здорового образа жизни.",
|
||||
"email": "dmitriy.sidorov@example.com",
|
||||
"interests": [
|
||||
{ "value": "Спорт, фитнес и ЗОЖ", "label": "Спорт, фитнес и ЗОЖ" },
|
||||
{ "value": "Волонтерство и благотворительность", "label": "Волонтерство и благотворительность" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"username": "Елена Волкова",
|
||||
"photo": "https://example.com/photos/6.jpg",
|
||||
"about": "Психолог, занимаюсь личностным ростом и развитием.",
|
||||
"email": "elena.volkova@example.com",
|
||||
"interests": [
|
||||
{ "value": "Психология и психическое здоровье", "label": "Психология и психическое здоровье" },
|
||||
{ "value": "Литература и история", "label": "Литература и история" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"username": "Артем Морозов",
|
||||
"photo": "https://example.com/photos/7.jpg",
|
||||
"about": "Ведущий мероприятий и организатор, люблю работать с людьми.",
|
||||
"email": "artem.morozov@example.com",
|
||||
"interests": [
|
||||
{ "value": "Настольные игры", "label": "Настольные игры" },
|
||||
{ "value": "Кино и другое многомодальное искусство", "label": "Кино и другое многомодальное искусство" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"username": "Ирина Фёдорова",
|
||||
"photo": "https://example.com/photos/8.jpg",
|
||||
"about": "Веду блог о моде и стиле, увлекаюсь новыми трендами.",
|
||||
"email": "irina.fedorova@example.com",
|
||||
"interests": [
|
||||
{ "value": "Мода", "label": "Мода" },
|
||||
{ "value": "Путешествия и туризм", "label": "Путешествия и туризм" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"username": "Сергей Чернов",
|
||||
"photo": "https://example.com/photos/9.jpg",
|
||||
"about": "Разработчик мобильных приложений, увлекаюсь игровыми технологиями.",
|
||||
"email": "sergey.chernov@example.com",
|
||||
"interests": [
|
||||
{ "value": "Соревновательные видеоигры", "label": "Соревновательные видеоигры" },
|
||||
{ "value": "Новые технологии, ИИ, техника", "label": "Новые технологии, ИИ, техника" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"username": "Татьяна Лебедева",
|
||||
"photo": "https://example.com/photos/10.jpg",
|
||||
"about": "Работаю в области маркетинга, увлекаюсь продвижением брендов.",
|
||||
"email": "tatyana.lebedeva@example.com",
|
||||
"interests": [
|
||||
{ "value": "Маркетинг", "label": "Маркетинг" },
|
||||
{ "value": "Литература и история", "label": "Литература и история" }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
module.exports = router;
|
||||
|
||||
const data = require('./data/users.json');
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
//res.status(500).send({
|
||||
// message: 'Internal server error'
|
||||
//});
|
||||
res.json(data)
|
||||
});
|
||||
|
||||
router.get('/:id', (req, res) => {
|
||||
//res.status(500).send({
|
||||
// message: 'Internal server error'
|
||||
//});
|
||||
const userId = parseInt(req.params.id);
|
||||
res.json(data.find(item => item.id = userId));
|
||||
});
|
||||
|
||||
router.post('/', (req, res) => {
|
||||
//res.status(500).send({
|
||||
// message: 'Internal server error'
|
||||
//});
|
||||
const data = req.body;
|
||||
|
||||
|
||||
res.status(200).send();
|
||||
});
|
||||
|
||||
router.put('/:id', (req, res) => {
|
||||
//res.status(500).send({
|
||||
// message: 'Internal server error'
|
||||
//});
|
||||
const userId = parseInt(req.params.id);
|
||||
const data = req.body;
|
||||
res.status(200).send();
|
||||
});
|
||||
BIN
server/routers/old/bushou/images/60px-%E4%B8%80-bigseal.svg.png
Normal file
|
After Width: | Height: | Size: 377 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%80-bronze.svg.png
Normal file
|
After Width: | Height: | Size: 470 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%80-clerical.svg.png
Normal file
|
After Width: | Height: | Size: 578 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%80-oracle.svg.png
Normal file
|
After Width: | Height: | Size: 481 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%80-seal.svg.png
Normal file
|
After Width: | Height: | Size: 368 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%80-silk.svg.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%80-slip.svg.png
Normal file
|
After Width: | Height: | Size: 539 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%A8-bigseal.svg.png
Normal file
|
After Width: | Height: | Size: 414 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%A8-seal.svg.png
Normal file
|
After Width: | Height: | Size: 414 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%B6-bronze.svg.png
Normal file
|
After Width: | Height: | Size: 739 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%B6-seal.svg.png
Normal file
|
After Width: | Height: | Size: 686 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%BF-bigseal.svg.png
Normal file
|
After Width: | Height: | Size: 750 B |
BIN
server/routers/old/bushou/images/60px-%E4%B8%BF-seal.svg.png
Normal file
|
After Width: | Height: | Size: 687 B |
BIN
server/routers/old/bushou/images/60px-%E4%B9%99-bigseal.svg.png
Normal file
|
After Width: | Height: | Size: 706 B |
BIN
server/routers/old/bushou/images/60px-%E4%B9%99-bronze.svg.png
Normal file
|
After Width: | Height: | Size: 776 B |
BIN
server/routers/old/bushou/images/60px-%E4%B9%99-oracle.svg.png
Normal file
|
After Width: | Height: | Size: 628 B |
BIN
server/routers/old/bushou/images/60px-%E4%B9%99-seal.svg.png
Normal file
|
After Width: | Height: | Size: 742 B |
BIN
server/routers/old/bushou/images/60px-%E4%B9%99-silk.svg.png
Normal file
|
After Width: | Height: | Size: 853 B |
BIN
server/routers/old/bushou/images/60px-%E4%BA%85-seal.svg.png
Normal file
|
After Width: | Height: | Size: 911 B |
BIN
server/routers/old/bushou/images/60px-%E4%BA%8C-bigseal.svg.png
Normal file
|
After Width: | Height: | Size: 601 B |
BIN
server/routers/old/bushou/images/60px-%E4%BA%8C-bronze.svg.png
Normal file
|
After Width: | Height: | Size: 648 B |
BIN
server/routers/old/bushou/images/60px-%E4%BA%8C-oracle.svg.png
Normal file
|
After Width: | Height: | Size: 709 B |
BIN
server/routers/old/bushou/images/60px-%E4%BA%8C-seal.svg.png
Normal file
|
After Width: | Height: | Size: 442 B |