From 272961c5835f356e0bbd3c2654587fe59f473cef Mon Sep 17 00:00:00 2001 From: Rushan Sitdikov Date: Fri, 31 May 2024 18:01:50 +0300 Subject: [PATCH] school-stage stubs --- server/routers/school-stage/index.js | 3 +++ .../school-stage/json/account/account.json | 2 -- .../routers/school-stage/json/login/success.json | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 server/routers/school-stage/json/login/success.json diff --git a/server/routers/school-stage/index.js b/server/routers/school-stage/index.js index 750641b..d842da1 100644 --- a/server/routers/school-stage/index.js +++ b/server/routers/school-stage/index.js @@ -7,5 +7,8 @@ router.get('/teachers', (request, response) => { router.get('/account', (request, response) => { response.send(require('./json/account/account.json')) }) +router.post('/login', (request, response) => { + response.send(require('../json/login/success.json')) +}) module.exports = router; \ No newline at end of file diff --git a/server/routers/school-stage/json/account/account.json b/server/routers/school-stage/json/account/account.json index c5b68dd..e6de321 100644 --- a/server/routers/school-stage/json/account/account.json +++ b/server/routers/school-stage/json/account/account.json @@ -2,7 +2,6 @@ "data": [ { "login": "user1", - "password": "1234", "photo": "boy", "surname": "Иванов", "name": "Иван", @@ -14,7 +13,6 @@ }, { "login": "user2", - "password": "1234", "photo": "boy", "surname": "Александров", "name": "Александр", diff --git a/server/routers/school-stage/json/login/success.json b/server/routers/school-stage/json/login/success.json new file mode 100644 index 0000000..317e15a --- /dev/null +++ b/server/routers/school-stage/json/login/success.json @@ -0,0 +1,15 @@ +{ + "data": + { + "login": "user1", + "photo": "boy", + "surname": "Иванов", + "name": "Иван", + "class": "2", + "group": "1", + "number": "+7 927 030 13 00", + "teacher": "Иванова Валерия Константиновна", + "lessons": ["02.05", "07.05", "14.05", "17.05", "21.05", "24.05", "28.05"] + } + +} \ No newline at end of file