From 0208e29ae32fbc65bdbd42b597204ee715a7ac93 Mon Sep 17 00:00:00 2001 From: WlfromB Date: Sat, 7 Dec 2024 09:49:53 +0300 Subject: [PATCH] old edateam stubs --- server/index.js | 1 + server/routers/edateam-legacy/index.js | 15 +++ .../json/homepage-data/success.json | 112 ++++++++++++++++++ .../json/recipe-data/success.json | 58 +++++++++ .../json/userpage-data/success.json | 30 +++++ 5 files changed, 216 insertions(+) create mode 100644 server/routers/edateam-legacy/index.js create mode 100644 server/routers/edateam-legacy/json/homepage-data/success.json create mode 100644 server/routers/edateam-legacy/json/recipe-data/success.json create mode 100644 server/routers/edateam-legacy/json/userpage-data/success.json diff --git a/server/index.js b/server/index.js index 51c954d..5130f24 100644 --- a/server/index.js +++ b/server/index.js @@ -46,6 +46,7 @@ app.use('/epja-2024-1', require('./routers/epja-2024-1')) 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')) app.use(require('./error')) diff --git a/server/routers/edateam-legacy/index.js b/server/routers/edateam-legacy/index.js new file mode 100644 index 0000000..0892e93 --- /dev/null +++ b/server/routers/edateam-legacy/index.js @@ -0,0 +1,15 @@ +const router = require('express').Router(); + +router.get('/recipe-data', (request, response) => { + response.send(require('./json/recipe-data/success.json')) + }) + +router.get('/userpage-data', (req, res)=>{ + res.send(require('./json/userpage-data/success.json')) +}) + +router.get('/homepage-data', (req, res)=>{ + res.send(require('./json/homepage-data/success.json')) +}) + +module.exports = router; \ No newline at end of file diff --git a/server/routers/edateam-legacy/json/homepage-data/success.json b/server/routers/edateam-legacy/json/homepage-data/success.json new file mode 100644 index 0000000..aae9ebb --- /dev/null +++ b/server/routers/edateam-legacy/json/homepage-data/success.json @@ -0,0 +1,112 @@ +{ + "data": [ + { + "src": "pancakes_meat", + "alt": "Фотография блинчиков с мясом, сыром и луком", + "href": "?=dish01", + "name": "Блинчики с мясом, сыром и лучком", + "category": [ + "Ужины" + ] + }, + { + "src": "cheesecakes", + "alt": "Фотография сырников из творога", + "href": "?=dish02", + "name": "Сырники из творога", + "category": [ + "Завтраки" + ] + }, + { + "src": "borsch", + "alt": "Фотография борща", + "href": "?=dish03", + "name": "Борщ", + "category": [ + "Супы" + ] + }, + { + "src": "vareniki", + "alt": "Фотография вареников", + "href": "?=dish04", + "name": "Ленивые вареники", + "category": [ + "Ужины" + ] + }, + { + "src": "rice_porridge", + "alt": "Фотография рисовой каши", + "href": "?=dish05", + "name": "Рисовая каша", + "category": [ + "Завтраки" + ] + }, + { + "src": "cutlets", + "alt": "Фотография котлет по-киевски", + "href": "?=dish06", + "name": "Котлеты по-киевски", + "category": [ + "Обеды" + ] + }, + { + "src": "draniki", + "alt": "Фотография драников", + "href": "?=dish07", + "name": "Драники", + "category": [ + "Обеды" + ] + }, + { + "src": "meringue", + "alt": "Фотография безе", + "href": "?=dish08", + "name": "Безе", + "category": [ + "Выпечка и десерты" + ] + }, + { + "src": "goulash", + "alt": "Фотография гуляша", + "href": "?=dish09", + "name": "Гуляш", + "category": [ + "Мясо" + ] + }, + { + "src": "pancakes_cherries", + "alt": "Фотография блинчиков с вишней и творожным сыром", + "href": "?=dish10", + "name": "Блинчики с вишней и творожным сыром", + "category": [ + "Завтраки" + ] + }, + { + "src": "canned_soup", + "alt": "Фотография супа из рыбных консервов", + "href": "?=dish11", + "name": "Суп из рыбных консервов", + "category": [ + "Супы" + ] + }, + { + "src": "salad", + "alt": "Фотография салата", + "href": "?=dish12", + "name": "Салат \"Весенний\"", + "category": [ + "Салаты" + ] + } + ] +} \ No newline at end of file diff --git a/server/routers/edateam-legacy/json/recipe-data/success.json b/server/routers/edateam-legacy/json/recipe-data/success.json new file mode 100644 index 0000000..402a048 --- /dev/null +++ b/server/routers/edateam-legacy/json/recipe-data/success.json @@ -0,0 +1,58 @@ +{ + "name":"Блинчики с вишней и творожным сыром", + + "stages": +[ + "Смешать муку, молоко, яйца, сахар и соль в миске", + "Добавить вишню в тесто и перемешать", + "Вылить тесто на разогретую сковороду и обжарить с двух сторон до золотистого цвета", + "Подавать блинчики, украсив творожным сыром сверху" +], + + "table": +[ + { "ingredient": "1", + "weight": "500 гр", + "price1": "500р.", + "price2": "439р.", + "price3": "600р." }, + + { "ingredient": "Ингредиент 2", + "weight": "2 шт", + "price1": "120р.", + "price2": "150р.", + "price3": "130р." }, + + { "ingredient": "Ингредиент 3", + "weight": "500 гр", + "price1": "12р.", + "price2": "12.99р.", + "price3": "10р." }, + + { "ingredient": "Ингредиент 4", + "weight": "500 гр", + "price1": "500р.", + "price2": "439р.", + "price3": "600р." }, + + { "ingredient": "Ингредиент 5", + "weight": "500 гр", + "price1": "500р.", + "price2": "439р.", + "price3": "600р." }, + + { "ingredient": "Ингредиент 6", + "weight": "500 гр", + "price1": "500р.", + "price2": "439р.", + "price3": "600р." } +], + + "tags": +[ + { "name": "#блины", "href": "#01" }, + { "name": "#вишня", "href": "#02" }, + { "name": "#молоко"," href": "#03" } +] + +} \ No newline at end of file diff --git a/server/routers/edateam-legacy/json/userpage-data/success.json b/server/routers/edateam-legacy/json/userpage-data/success.json new file mode 100644 index 0000000..dbbf775 --- /dev/null +++ b/server/routers/edateam-legacy/json/userpage-data/success.json @@ -0,0 +1,30 @@ +{ + "data":{ + "id":1, + "loginname":"Логин пользователя", + "datesignin":"2024/05/18", + "favoritedishes": + [ + {"id":1, + "dishlink":"?=dish1", + "dishname":"Блюдо1" + }, + {"id":2, + "dishlink":"?=dish2", + "dishname":"Блюдо2" + }, + {"id":3, + "dishlink":"?=dish3", + "dishname":"Блюдо3" + }, + {"id":4, + "dishlink":"?=dish4", + "dishname":"Блюдо4" + }, + {"id":5, + "dishlink":"?=dish5", + "dishname":"Блюдо5" + } + ] + } +} \ No newline at end of file