Compare commits

..

No commits in common. "master" and "connectme-request" have entirely different histories.

16 changed files with 241 additions and 539 deletions

26
package-lock.json generated
View File

@ -25,7 +25,6 @@
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"mongodb": "^6.12.0", "mongodb": "^6.12.0",
"mongoose": "^8.9.2", "mongoose": "^8.9.2",
"mongoose-sequence": "^6.0.1",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"pbkdf2-password": "^1.2.1", "pbkdf2-password": "^1.2.1",
"rotating-file-stream": "^3.2.5", "rotating-file-stream": "^3.2.5",
@ -2134,12 +2133,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/async": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
"integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
"license": "MIT"
},
"node_modules/asynckit": { "node_modules/asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@ -5649,12 +5642,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
},
"node_modules/lodash.includes": { "node_modules/lodash.includes": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
@ -6008,19 +5995,6 @@
"url": "https://opencollective.com/mongoose" "url": "https://opencollective.com/mongoose"
} }
}, },
"node_modules/mongoose-sequence": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/mongoose-sequence/-/mongoose-sequence-6.0.1.tgz",
"integrity": "sha512-uXnLCW9pu2V49Xw8BmdXdeRugd2mv+ntu3nT2Bbm33pNRmmvHE2GKA+8BASKoQt960McLX4VL78wkb492f6MoQ==",
"license": "GPL-2.0",
"dependencies": {
"async": "^3.2.5",
"lodash": "^4.17.21"
},
"peerDependencies": {
"mongoose": ">=5"
}
},
"node_modules/mongoose/node_modules/mongodb": { "node_modules/mongoose/node_modules/mongodb": {
"version": "6.12.0", "version": "6.12.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.12.0.tgz", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.12.0.tgz",

View File

@ -39,7 +39,6 @@
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"mongodb": "^6.12.0", "mongodb": "^6.12.0",
"mongoose": "^8.9.2", "mongoose": "^8.9.2",
"mongoose-sequence": "^6.0.1",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"pbkdf2-password": "^1.2.1", "pbkdf2-password": "^1.2.1",
"rotating-file-stream": "^3.2.5", "rotating-file-stream": "^3.2.5",

View File

@ -1,6 +1,5 @@
const { Schema, model } = require('mongoose') const { Schema, model } = require('mongoose')
const { orderStatus } = require('./const') const { orderStatus } = require('./const')
const { OrderNumberModel } = require('./order.number')
const schema = new Schema({ const schema = new Schema({
phone: { phone: {
@ -28,10 +27,6 @@ const schema = new Schema({
type: String, type: String,
required: true required: true
}, },
orderNumber: {
type: String,
unique: true
},
status: { status: {
type: String, type: String,
required: true, required: true,
@ -52,18 +47,6 @@ const schema = new Schema({
}, },
}) })
schema.pre('save', async function (next) {
if (this.isNew) {
const counter = await OrderNumberModel.findOneAndUpdate(
{ _id: 'orderNumber' },
{ $inc: { sequenceValue: 1 } },
{ new: true, upsert: true }
)
this.orderNumber = counter.sequenceValue.toString()
}
next()
})
schema.set('toJSON', { schema.set('toJSON', {
virtuals: true, virtuals: true,
versionKey: false, versionKey: false,

View File

@ -1,14 +0,0 @@
const { Schema, model } = require('mongoose')
const schema = new Schema({
_id: {
type: String,
required: true,
},
sequenceValue: {
type: Number,
default: 0
}
})
exports.OrderNumberModel = model('dry-wash-order-number', schema)

View File

@ -9,7 +9,7 @@ router.get("/update-like", (request, response) => {
}); });
router.get("/categories", (request, response) => { router.get("/categories", (request, response) => {
response.send(require("./json/home-page-data/all-games.json")); response.send(require("./json/categories/success.json"));
}); });
router.get("/shopping-cart", (request, response) => { router.get("/shopping-cart", (request, response) => {

View File

@ -0,0 +1,186 @@
{
"success": true,
"data": {
"games1": [
{
"id": 1,
"title": "How to Survive",
"price": 259,
"old_price": 500,
"image": "sales_game1",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 2,
"title": "Red Solstice 2 Survivors",
"price": 561,
"image": "sales_game2",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 3,
"title": "Sons Of The Forests",
"price": 820,
"old_price": 1100,
"image": "new_game2",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 4,
"title": "The Witcher 3: Wild Hunt",
"price": 990,
"old_price": 1200,
"image": "leaders_game4",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 5,
"title": "Atomic Heart",
"price": 1200,
"old_price": 2500,
"image": "leaders_game5",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 6,
"title": "Crab Game",
"price": 600,
"old_price": 890,
"image": "leaders_game6",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
}
],
"games2": [
{
"id": 7,
"title": "Alpha League",
"price": 299,
"image": "new_game1",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 8,
"title": "Sons Of The Forests",
"price": 820,
"old_price": 1100,
"image": "new_game2",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 9,
"title": "Pacific Drives",
"price": 1799,
"image": "new_game3",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 4,
"title": "The Witcher 3: Wild Hunt",
"price": 990,
"old_price": 1200,
"image": "leaders_game4",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 5,
"title": "Atomic Heart",
"price": 1200,
"old_price": 2500,
"image": "leaders_game5",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 6,
"title": "Crab Game",
"price": 600,
"old_price": 890,
"image": "leaders_game6",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
}
],
"games3": [
{
"id": 10,
"title": "Elden Ring",
"price": 3295,
"old_price": 3599,
"image": "leaders_game2",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 11,
"title": "Counter-Strike 2",
"price": 479,
"image": "leaders_game1",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 12,
"title": "PUBG: BATTLEGROUNDS",
"price": 199,
"image": "leaders_game3",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 4,
"title": "The Witcher 3: Wild Hunt",
"price": 990,
"old_price": 1200,
"image": "leaders_game4",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 5,
"title": "Atomic Heart",
"price": 1200,
"old_price": 2500,
"image": "leaders_game5",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
},
{
"id": 6,
"title": "Crab Game",
"price": 600,
"old_price": 890,
"image": "leaders_game6",
"os": "windows",
"fav1": "star1",
"fav2": "star2"
}
]
}
}

View File

@ -5,7 +5,7 @@
{ {
"username": ользователь1", "username": ользователь1",
"text": "Текст комментария 1", "text": "Текст комментария 1",
"likes": 11, "likes": 9,
"rating": 8, "rating": 8,
"date": "2025-03-01T10:00:00Z" "date": "2025-03-01T10:00:00Z"
}, },
@ -19,7 +19,7 @@
{ {
"username": ользователь3", "username": ользователь3",
"text": "Текст комментария 3", "text": "Текст комментария 3",
"likes": 2, "likes": 5,
"rating": 3, "rating": 3,
"date": "2025-02-01T10:00:00Z" "date": "2025-02-01T10:00:00Z"
}, },

View File

@ -3,197 +3,147 @@
"data": [ "data": [
{ {
"id": 1, "id": 1,
"title": "The Witcher 3: Wild Hunt", "name": "The Witcher 3: Wild Hunt",
"image": "game1", "image": "game1",
"price": 990, "text": "$10",
"old_price": 1200,
"os": "windows",
"imgPath": "img_top_1", "imgPath": "img_top_1",
"description": "Эпическая RPG с открытым миром, в которой Геральт из Ривии охотится на монстров и раскрывает политические заговоры.", "description": "Эпическая RPG с открытым миром, в которой Геральт из Ривии охотится на монстров и раскрывает политические заговоры.",
"category": "RPG" "category": "RPG"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 2, "id": 2,
"title": "Red Dead Redemption 2", "name": "Red Dead Redemption 2",
"image": "game2", "image": "game2",
"price": 980, "text": "$10",
"old_price": 3800,
"os": "windows",
"imgPath": "img_top_2", "imgPath": "img_top_2",
"description": "Приключенческая игра с открытым миром на Диком Западе, рассказывающая историю Артура Моргана.", "description": "Приключенческая игра с открытым миром на Диком Западе, рассказывающая историю Артура Моргана.",
"category": "Adventures" "category": "Adventures"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 3, "id": 3,
"title": "Forza Horizon 5", "name": "Forza Horizon 5",
"image": "game3", "image": "game3",
"price": 1900, "text": "$10",
"os": "windows",
"imgPath": "img_top_3", "imgPath": "img_top_3",
"description": "Гоночная игра с огромным открытым миром, действие которой происходит в Мексике.", "description": "Гоночная игра с огромным открытым миром, действие которой происходит в Мексике.",
"category": "Race" "category": "Race"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 4, "id": 4,
"title": "Atomic Heart", "name": "Atomic Heart",
"image": "game4", "image": "game4",
"price": 1200, "text": "$10",
"old_price": 2500,
"os": "windows",
"imgPath": "img_top_4", "imgPath": "img_top_4",
"description": "Экшен-шутер с элементами RPG, разворачивающийся в альтернативной Советской России.", "description": "Экшен-шутер с элементами RPG, разворачивающийся в альтернативной Советской России.",
"category": "Shooters" "category": "Shooters"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 5, "id": 5,
"title": "Counter-Strike 2", "name": "Counter-Strike 2",
"image": "game5", "image": "game5",
"price": 479, "text": "$10",
"os": "windows",
"imgPath": "img_top_5", "imgPath": "img_top_5",
"description": "Популярный онлайн-шутер с соревновательным геймплеем и тактическими элементами.", "description": "Популярный онлайн-шутер с соревновательным геймплеем и тактическими элементами.",
"category": "Shooters" "category": "Shooters"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 6, "id": 6,
"title": "Grand Theft Auto V", "name": "Grand Theft Auto V",
"image": "game6", "image": "game6",
"price": 700, "text": "$10",
"os": "windows",
"imgPath": "img_top_6", "imgPath": "img_top_6",
"description": "Игра с открытым миром, где можно погрузиться в криминальный мир Лос-Сантоса.", "description": "Игра с открытым миром, где можно погрузиться в криминальный мир Лос-Сантоса.",
"category": "Adventures" "category": "Adventures"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 7, "id": 7,
"title": "Assassins Creed IV: Black Flag", "name": "Assassins Creed IV: Black Flag",
"image": "game7", "image": "game7",
"price": 1100, "text": "$10",
"os": "windows",
"imgPath": "img_top_7", "imgPath": "img_top_7",
"description": "Приключенческая игра о пиратах и морских сражениях в эпоху золотого века пиратства.", "description": "Приключенческая игра о пиратах и морских сражениях в эпоху золотого века пиратства.",
"category": "Adventures" "category": "Adventures"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 8, "id": 8,
"title": "Spider-Man", "name": "Spider-Man",
"image": "game8", "image": "game8",
"price": 3800, "text": "$10",
"os": "windows",
"imgPath": "img_top_8", "imgPath": "img_top_8",
"description": "Игра о супергерое Человеке-пауке с захватывающими битвами и паркуром по Нью-Йорку.", "description": "Игра о супергерое Человеке-пауке с захватывающими битвами и паркуром по Нью-Йорку.",
"category": "Action" "category": "Action"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 9, "id": 9,
"title": "Assassins Creed Mirage", "name": "Assassins Creed Mirage",
"image": "game9", "image": "game9",
"price": 1600, "text": "$10",
"os": "windows",
"imgPath": "img_top_9", "imgPath": "img_top_9",
"description": "Приключенческая игра с упором на скрытность, вдохновленная классическими частями серии.", "description": "Приключенческая игра с упором на скрытность, вдохновленная классическими частями серии.",
"category": "Action" "category": "Action"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 10, "id": 10,
"title": "Assassins Creed Valhalla", "name": "Assassins Creed Valhalla",
"image": "game10", "image": "game10",
"price": 800, "text": "$10",
"old_price": 2200,
"os": "windows",
"imgPath": "img_top_10", "imgPath": "img_top_10",
"description": "RPG с открытым миром о викингах, включающая битвы, исследования и строительство поселений.", "description": "RPG с открытым миром о викингах, включающая битвы, исследования и строительство поселений.",
"category": "RPG" "category": "RPG"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 11, "id": 11,
"title": "ARK: Survival Evolved", "name": "ARK: Survival Evolved",
"image": "game11", "image": "game11",
"price": 790, "text": "$10",
"os": "windows",
"imgPath": "img_top_11", "imgPath": "img_top_11",
"description": "Выживание в открытом мире с динозаврами, строительством и многопользовательскими элементами.", "description": "Выживание в открытом мире с динозаврами, строительством и многопользовательскими элементами.",
"category": "Simulators" "category": "Simulators"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 12, "id": 12,
"title": "FIFA 23", "name": "FIFA 23",
"image": "game12", "image": "game12",
"price": 3900, "text": "$10",
"os": "windows",
"imgPath": "img_top_12", "imgPath": "img_top_12",
"description": "Популярный футбольный симулятор с улучшенной графикой и реалистичным геймплеем.", "description": "Популярный футбольный симулятор с улучшенной графикой и реалистичным геймплеем.",
"category": "Sports" "category": "Sports"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 13, "id": 13,
"title": "Dirt 5", "name": "Dirt 5",
"image": "game13", "image": "game13",
"price": 2300, "text": "$10",
"os": "windows",
"imgPath": "img_top_13", "imgPath": "img_top_13",
"description": "Аркадная гоночная игра с фокусом на ралли и внедорожных соревнованиях.", "description": "Аркадная гоночная игра с фокусом на ралли и внедорожных соревнованиях.",
"category": "Race" "category": "Race"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 14, "id": 14,
"title": "Cyberpunk 2077", "name": "Cyberpunk 2077",
"image": "game14", "image": "game14",
"price": 3400, "text": "$10",
"os": "windows",
"imgPath": "img_top_14", "imgPath": "img_top_14",
"description": "RPG в киберпанк-сеттинге с нелинейным сюжетом и детализированным открытым миром.", "description": "RPG в киберпанк-сеттинге с нелинейным сюжетом и детализированным открытым миром.",
"category": "RPG" "category": "RPG"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 15, "id": 15,
"title": "Age of Empires IV", "name": "Age of Empires IV",
"image": "game15", "image": "game15",
"price": 3200, "text": "$10",
"os": "windows",
"imgPath": "img_top_15", "imgPath": "img_top_15",
"description": "Классическая стратегия в реальном времени с историческими кампаниями.", "description": "Классическая стратегия в реальном времени с историческими кампаниями.",
"category": "Strategies" "category": "Strategies"
,"fav1": "star1",
"fav2": "star2"
}, },
{ {
"id": 16, "id": 16,
"title": "Civilization VI", "name": "Civilization VI",
"image": "game16", "image": "game16",
"price": 4200, "text": "$10",
"os": "windows",
"imgPath": "img_top_16", "imgPath": "img_top_16",
"description": "Глобальная пошаговая стратегия, в которой игроки строят и развивают цивилизации.", "description": "Глобальная пошаговая стратегия, в которой игроки строят и развивают цивилизации.",
"category": "Strategies" "category": "Strategies"
} }
] ]
} }

View File

@ -1,16 +0,0 @@
{
"success": true,
"data": {
"ids": [
3,
13,
1,
10,
4,
9,
15,
6,
7
]
}
}

View File

@ -3,51 +3,43 @@
"data": { "data": {
"topSail": [ "topSail": [
{ {
"id": 1,
"image": "game1", "image": "game1",
"price": 1500, "text": "$10",
"imgPath": "img_top_1" "imgPath": "img_top_1"
}, },
{ {
"id": 2,
"image": "game2", "image": "game2",
"price": 980, "text": "$10",
"imgPath": "img_top_2" "imgPath": "img_top_2"
}, },
{ {
"id": 3,
"image": "game3", "image": "game3",
"price": 1900, "text": "$10",
"imgPath": "img_top_3" "imgPath": "img_top_3"
}, },
{ {
"id": 4,
"image": "game4", "image": "game4",
"price": 1200, "text": "$10",
"imgPath": "img_top_4" "imgPath": "img_top_4"
}, },
{ {
"id": 5,
"image": "game5", "image": "game5",
"price": 479, "text": "$10",
"imgPath": "img_top_5" "imgPath": "img_top_5"
}, },
{ {
"id": 6,
"image": "game6", "image": "game6",
"price": 700, "text": "$10",
"imgPath": "img_top_6" "imgPath": "img_top_6"
}, },
{ {
"id": 7,
"image": "game7", "image": "game7",
"price": 1100, "text": "$10",
"imgPath": "img_top_7" "imgPath": "img_top_7"
}, },
{ {
"id": 8,
"image": "game8", "image": "game8",
"price": 3800, "text": "$10",
"imgPath": "img_top_8" "imgPath": "img_top_8"
} }
], ],

View File

@ -788,121 +788,5 @@
"image_url": "w_six" "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"
}
]
} }
} }

View File

@ -788,121 +788,5 @@
"image_url": "w_six" "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"
}
]
} }
} }

View File

@ -788,121 +788,5 @@
"image_url": "w_six" "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"
}
]
} }
} }

View File

@ -27,12 +27,10 @@ router.post('/:user_id/:action/:id', (req, res) => {
const user_id = parseInt(req.params.user_id); const user_id = parseInt(req.params.user_id);
const id = parseInt(req.params.id); const id = parseInt(req.params.id);
const action = req.params.action; const action = req.params.action;
/*
if (users_data.findIndex((item) => item.id === user_id) === -1 || data.findIndex((item) => item.id === id) === -1) { if (users_data.findIndex((item) => item.id === user_id) === -1 || data.findIndex((item) => item.id === id) === -1) {
res.status(404).send(); res.status(404).send();
return; return;
} }
*/
if (action !== 'participate' && action !== 'refuse') { if (action !== 'participate' && action !== 'refuse') {
res.status(400).send({ error: 'Invalid action' }); res.status(400).send({ error: 'Invalid action' });
return; return;

View File

@ -10,17 +10,6 @@
"Музыка" "Музыка"
] ]
}, },
{
"id": 1252744945,
"username": "Моряков Сергей",
"photo": "",
"about": "Люблю путешествия и фотографию, обожаю изучать новые культуры.",
"email": "sergey.moryakov@example.com",
"interests": [
"Путешествия и туризм",
"Искусство, фотография и дизайн"
]
},
{ {
"id": 2, "id": 2,
"username": "Мария Смирнова", "username": "Мария Смирнова",
@ -229,5 +218,16 @@
"Медицина и здоровье", "Медицина и здоровье",
"Спорт, фитнес и ЗОЖ" "Спорт, фитнес и ЗОЖ"
] ]
},
{
"id": 1252744945,
"username": "Моряков Сергей",
"photo": "https://i.pravatar.cc/150?img=50",
"about": "Люблю путешествия и фотографию, обожаю изучать новые культуры.",
"email": "maria.smirnova@example.com",
"interests": [
"Путешествия и туризм",
"Искусство, фотография и дизайн"
]
} }
] ]

View File

@ -27,12 +27,10 @@ router.post('/:to_id/:action/:from_id', (req, res) => {
const to_id = parseInt(req.params.to_id); const to_id = parseInt(req.params.to_id);
const from_id = parseInt(req.params.from_id); const from_id = parseInt(req.params.from_id);
const action = req.params.action; const action = req.params.action;
/*
if (data.findIndex((item) => item.id === to_id) === -1 || data.findIndex((item) => item.id === from_id) === -1) { if (data.findIndex((item) => item.id === to_id) === -1 || data.findIndex((item) => item.id === from_id) === -1) {
res.status(404).send(); res.status(404).send();
return; return;
} }
*/
if (action !== 'like' && action !== 'dislike') { if (action !== 'like' && action !== 'dislike') {
res.status(400).send({ error: 'Invalid action' }); res.status(400).send({ error: 'Invalid action' });
return; return;