From de22881c2885d17db882120edfdd3232b66f1938 Mon Sep 17 00:00:00 2001 From: Rushan Sitdikov Date: Mon, 3 Jun 2024 23:19:56 +0300 Subject: [PATCH] school-stage stubs --- server/routers/school-stage/index.js | 6 +++--- .../school-stage/json/teachers/success.json | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/server/routers/school-stage/index.js b/server/routers/school-stage/index.js index 6641501..ae5b309 100644 --- a/server/routers/school-stage/index.js +++ b/server/routers/school-stage/index.js @@ -16,11 +16,11 @@ router.post('/login', (request, response) => { const router = require('express').Router(); router.get('/teachers', (request, response) => { - response.send(require('./json/teachers/success.json')) + response.send(require('../json/teachers/success.json')) }) router.get('/account', (request, response) => { - response.send(require('./json/account/account.json')) + response.send(require('../json/account/account.json')) }) router.post('/login', (request, response) => { @@ -28,7 +28,7 @@ router.post('/login', (request, response) => { const password = request.body.password; try { - const users = require('./json/account/account.json'); + const users = require('../json/account/account.json'); const user = users.data.find(user => user.login === login && user.password === password); if (!user) { diff --git a/server/routers/school-stage/json/teachers/success.json b/server/routers/school-stage/json/teachers/success.json index 5afe3e7..4bba766 100644 --- a/server/routers/school-stage/json/teachers/success.json +++ b/server/routers/school-stage/json/teachers/success.json @@ -1,6 +1,15 @@ { "data": - { - "imageUrl": ["teacher1", "teacher2"] - } + [ + { + "imageUrl": "teacher1", + "name": "Иванова Валерия Константинова", + "status": "Педагог с бакалаврской степенью по театральному искусству. Обладает более чем 15-летним опытом работы на театральной сцене, является действующим актером театра и кино." + }, + { + "imageUrl": "teacher2", + "name": "Рогов Сергей Владимирович", + "status": "Педагог по актерскому мастерству с высшим образованием в области режиссуры, постановщик спектаклей. Опыт работы с детьми 10 лет." + } + ] } \ No newline at end of file