Compare commits

..

259 Commits

Author SHA1 Message Date
ab92c99321 Uncomment dogsitters app
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-02-08 12:47:43 +03:00
02963de893 Merge pull request 'Изменение путей запросов' (#96) from dogsitters-finder-3 into master
Reviewed-on: #96
2025-02-08 12:41:38 +03:00
48550416d9 Изменение путей запросов
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-02-08 12:40:39 +03:00
aa
878c5ffd68 Merge pull request 'изменение админ панели' (#95) from gamehub into master
Reviewed-on: #95
2025-02-08 11:45:19 +03:00
aaeii
6e37fe93f7 изменение админ панели
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-02-08 11:44:00 +03:00
Primakov Alexandr Alexandrovich
72a2667549 1.2.1 2025-02-08 10:39:49 +03:00
Primakov Alexandr Alexandrovich
39db7b4d26 fix 2025-02-08 10:39:45 +03:00
aa
ff25c0ecb9 Merge pull request 'fix path' (#93) from gamehub into master
Reviewed-on: #93
2025-02-08 10:34:05 +03:00
aaeii
f1a93bffb5 fix path 2025-02-08 10:33:24 +03:00
aa
aa231d4f43 Merge pull request 'upd json' (#92) from gamehub into master
Reviewed-on: #92
2025-02-08 09:59:04 +03:00
aaeii
f254d57db4 upd json 2025-02-08 09:57:34 +03:00
106f835934 Merge pull request 'dogsitters-finder' (#91) from dogsitters-finder into master
Reviewed-on: #91
2025-02-08 04:50:31 +03:00
f9b30a4cfd Merge branch 'master' into dogsitters-finder
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-02-08 04:45:56 +03:00
5e4a99529d Add backend and db settings 2025-02-08 04:44:17 +03:00
4d585002d7 Add backend and DB settings 2025-02-08 04:38:22 +03:00
b073fe3fdf Merge pull request 'Изменены запросы и добавлены новые' (#89) from dogsitters-finder-2 into master
Reviewed-on: #89
2025-02-08 02:39:15 +03:00
312cc229d8 Изменены запросы и добавлены новые
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-02-08 02:23:22 +03:00
11b1d670d0 Merge pull request 'small fixes in kfu-m-24-1/eng-it-lean' (#88) from kfu-m-24-1/eng-it-lean into master
Reviewed-on: #88
2025-02-07 12:26:56 +03:00
Ruslan Zagitov
522ea36bb9 fix: delete broken dicitonary
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-02-07 00:32:53 +03:00
Ruslan Zagitov
8be391c8e1 fix: /units 2025-02-07 00:30:46 +03:00
Ruslan Zagitov
ea80304c21 fix: /users 2025-02-07 00:08:03 +03:00
aa
771f75ef08 Merge pull request 'add new game, add link' (#87) from gamehub into master
Reviewed-on: #87
2025-02-05 22:26:15 +03:00
aaeii
edf9b2c82b add new game, add link 2025-02-05 22:24:05 +03:00
Ruslan Zagitov
8c3bf8a8ed fix 2025-02-05 19:34:45 +03:00
a88d3657bf Merge pull request 'kfu-m-24-1/eng-it-lean quick fix' (#86) from kfu-m-24-1/eng-it-lean into master
Reviewed-on: #86
2025-02-05 19:33:51 +03:00
Ruslan Zagitov
1656ce8690 Merge branch 'master' into kfu-m-24-1/eng-it-lean 2025-02-05 19:25:39 +03:00
Ruslan Zagitov
7cdbec53ee fix 2025-02-05 18:55:22 +03:00
eee00f0797 Merge pull request 'feat: kfu-m-24-1/eng-it-lean add /users endpoint; small features in /units' (#85) from kfu-m-24-1/eng-it-lean into master
Reviewed-on: #85
2025-02-05 13:54:09 +03:00
Ruslan Zagitov
33845b743d feat: add /users endpoint; update /units 2025-02-05 13:53:11 +03:00
Ruslan Zagitov
059139e213 feat: add /users endpoint; update /units 2025-02-05 13:45:49 +03:00
Ruslan Zagitov
005e7a0ac9 chore: add dictionaries 2025-02-05 13:25:11 +03:00
9ee59256a9 feat: generate order number (#69)
Добавил генерацию номера заказа при создании

Co-authored-by: RustamRu <kagapov.rustam@gmail.com>
Reviewed-on: #69
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2025-02-02 15:11:59 +03:00
aa
c2784dcf45 Merge pull request 'gamehub' (#76) from gamehub into master
Reviewed-on: #76
2025-02-01 16:20:44 +03:00
64ed9b8eda Merge pull request 'kazan-explore culture quiz' (#84) from kazan-explore into master
Reviewed-on: #84
2025-02-01 15:18:40 +03:00
e9814f36bf kazan-explore culture quiz
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2025-02-01 15:17:54 +03:00
0bd883df59 Merge pull request 'delete verification user' (#83) from sberhubproject into master
Reviewed-on: #83
2025-02-01 14:17:43 +03:00
1657b0c5e9 Merge pull request 'feat (connectme): add request for city' (#82) from connectme-request into master
Reviewed-on: #82
2025-02-01 14:15:36 +03:00
a9673b260f delete verification user 2025-02-01 14:15:33 +03:00
khisametdinov
8ee5ca5528 feat (connectme): add request for city
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-02-01 11:53:10 +03:00
e1e335098e Merge pull request '[feat] add interaction telegram bot' (#81) from sberhubproject into master
Reviewed-on: #81
2025-02-01 11:20:30 +03:00
619975d1e0 [feat] add interaction telegram bot 2025-02-01 11:19:41 +03:00
f29bc83d56 Merge pull request '[feat][refactor] add Gigachat and edit data users' (#80) from sberhubproject into master
Reviewed-on: #80
2025-02-01 09:39:46 +03:00
61347d1aee [feat][refactor] add Gigachat and edit data users 2025-02-01 09:38:54 +03:00
ac7a99ef15 Merge pull request 'kazan-explore services data fixed' (#79) from kazan-explore into master
Reviewed-on: #79
2025-02-01 03:43:02 +03:00
eb3f1f7e3f kazan-explore services data fixed 2025-02-01 03:42:16 +03:00
3e02ea5843 Merge pull request 'kazan-explore services data added' (#78) from kazan-explore into master
Reviewed-on: #78
2025-02-01 03:27:43 +03:00
d06aeeb246 kazan-explore services data added 2025-02-01 03:19:45 +03:00
e331f69885 Merge pull request '[refactor] edit data interests' (#77) from sberhubproject into master
Reviewed-on: #77
2025-02-01 01:10:39 +03:00
23f1277edb [refactor] edit data interests 2025-02-01 01:09:22 +03:00
aaeii
801f9ac1e3 new games-in-cart 2025-01-31 20:18:27 +03:00
16bffcafa6 Merge pull request 'feat: add vercel/ai package; gigachat api; refactor dictionaries; add units put request' (#72) from kfu-m-24-1/eng-it-lean into master
Reviewed-on: #72
2025-01-31 18:37:55 +03:00
922909397d Merge pull request 'kazan-explore changes' (#75) from kazan-explore into master
Reviewed-on: #75
2025-01-31 18:03:08 +03:00
233192ba01 kazan-explore changes 2025-01-31 18:00:56 +03:00
Ruslan Zagitov
f72d5220de fix: delete broken dictionary 2025-01-31 16:02:07 +03:00
Ruslan Zagitov
30af0fb1dd Merge branch 'master' into kfu-m-24-1/eng-it-lean 2025-01-31 15:54:22 +03:00
854e249100 Merge pull request 'edit data events' (#74) from sberhubproject into master
Reviewed-on: #74
2025-01-31 15:05:41 +03:00
eddad1cc3f edit data events 2025-01-31 15:02:49 +03:00
c96e435344 Merge pull request 'delete function delay' (#73) from sberhubproject into master
Reviewed-on: #73
2025-01-31 14:44:35 +03:00
7358faef1d delete function delay 2025-01-31 14:42:36 +03:00
Ruslan Zagitov
68de877b06 refactor: /dictionaries endpoint 2025-01-31 13:59:40 +03:00
c000106ec8 Merge pull request '[feat] add chgk api' (#71) from sber_web into master
Reviewed-on: #71
2025-01-31 13:43:18 +03:00
Max
da84344a63 [feat] add chgk api 2025-01-31 13:35:11 +03:00
Ruslan Zagitov
daf5bf7970 chore: install vercel/ai package; remove gigachat/ai static file; requests from /gigachat endpoint are not require SSL 2025-01-31 13:26:34 +03:00
Ruslan Zagitov
4ef941d62f fix: unit router PUT request 2025-01-30 12:41:00 +03:00
Ruslan Zagitov
16fda2e7ed feat: add gigachat api 2025-01-30 12:24:47 +03:00
ff15a48414 Merge pull request '[feat][refactor] add events and edit users' (#70) from sberhubproject into master
Reviewed-on: #70
2025-01-29 21:25:59 +03:00
367c0de6fb [feat][refactor] add events and edit users 2025-01-29 15:50:53 +03:00
3c89d8b9a8 Merge pull request 'feat: add get master with orders' (#68) from feat/get-master into master
Reviewed-on: #68
2025-01-26 11:02:24 +03:00
bdc8d9a8e0 feat: add get master with orders
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-01-26 00:41:48 +03:00
aaeii
cbbb376fd6 update json gamehub: fix format 2025-01-25 23:24:34 +03:00
aaeii
faaec7c718 update json gamehub: fix price 2025-01-25 23:16:03 +03:00
8814c2a64b Merge pull request 'kazan-explore multy stub changes' (#67) from kazan-explore into master
Reviewed-on: #67
2025-01-24 23:02:53 +03:00
298a82e0ae kazan-explore multy stub changes 2025-01-24 23:02:25 +03:00
a86eb0d4ef Merge pull request 'kazan-explore multy stub changes' (#66) from kazan-explore into master
Reviewed-on: #66
2025-01-24 22:42:50 +03:00
335179ad26 kazan-explore multy stub changes 2025-01-24 22:39:25 +03:00
a1d331b5b4 Merge pull request 'esc stubs fix2' (#65) from esc-stubs into master
Reviewed-on: #65
2025-01-24 16:54:00 +03:00
4b77958a92 esc stubs fix2
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-01-24 16:52:46 +03:00
b36ee36e3a Merge pull request 'esc stubs fix?' (#64) from esc-stubs into master
Reviewed-on: #64
2025-01-24 16:44:45 +03:00
48ffee1a78 esc stubs fix? 2025-01-24 16:42:42 +03:00
6e0934e585 Merge pull request 'esc stubs' (#63) from esc-stubs into master
Reviewed-on: #63
2025-01-24 16:31:13 +03:00
846db377ef esc stubs 2025-01-24 15:00:11 +03:00
Primakov Alexandr Alexandrovich
3e8a8997b9 1.2.0 2025-01-19 22:47:53 +03:00
Primakov Alexandr Alexandrovich
04bce4b90f todo-app: patch & delete tidi item 2025-01-19 22:47:47 +03:00
Primakov Alexandr Alexandrovich
3d935af6f1 fix get comments to unknown user 2025-01-19 22:35:22 +03:00
Primakov Alexandr Alexandrovich
0d5dc115b6 1.1.2 2025-01-19 22:23:25 +03:00
Primakov Alexandr Alexandrovich
15cfc129a5 todo-app: wome routes without jwt 2025-01-19 22:23:19 +03:00
Primakov Alexandr Alexandrovich
270fe51500 move old to legacy folder 2025-01-19 21:13:33 +03:00
Primakov Alexandr Alexandrovich
8a2afc3f1b 1.1.1 2025-01-19 21:05:16 +03:00
Primakov Alexandr Alexandrovich
d824844ae5 populate author of comments 2025-01-19 21:05:08 +03:00
Primakov Alexandr Alexandrovich
f95a26acbb todo-app: get item by id 2025-01-19 20:44:26 +03:00
e0618e431f feat: add get date orders 2025-01-19 11:29:11 +03:00
1b93a8e2bb fix: change get for orders v2 2025-01-19 10:23:48 +03:00
b8dc15cbc6 Merge pull request 'feat: use stubs for orders data (#64)' (#62) from feature/dry-wash-orders into master
Reviewed-on: #62
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2025-01-19 10:11:41 +03:00
RustamRu
949416d2a3 feat: use stubs for orders data (#64) 2025-01-18 23:02:45 +03:00
RustamRu
1ec9f1a7ec Revert "feat: use stubs for orders data (#64)"
This reverts commit 87c1cbb19e.
2025-01-18 23:00:20 +03:00
RustamRu
17c63e6fe0 Merge branch 'master' of ssh://85.143.175.152:222/bro-students/multy-stub 2025-01-18 22:58:00 +03:00
RustamRu
87c1cbb19e feat: use stubs for orders data (#64) 2025-01-18 22:57:56 +03:00
c86f84d037 merge: feature(freetracker): landing requests 2025-01-18 20:36:14 +03:00
b8bc2c83a3 Merge branch 'feature/freetracker-landing' 2025-01-18 20:32:00 +03:00
552457b5cb feature(freetracker): landing requests
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2025-01-18 20:28:22 +03:00
aaeii
909f7e4de9 update gamehub gamepage, categories 2025-01-18 19:48:02 +03:00
Primakov Alexandr Alexandrovich
86b79a7f49 comments 2025-01-18 17:45:16 +03:00
Primakov Alexandr Alexandrovich
d2d8b63aba fix item create 2025-01-18 17:16:35 +03:00
Primakov Alexandr Alexandrovich
0dcf961cce todo CR todo list 2025-01-18 17:08:09 +03:00
Primakov Alexandr Alexandrovich
38bc0c55c8 1.1.0 2025-01-18 16:52:14 +03:00
Primakov Alexandr Alexandrovich
9fb4219418 todo list get list 2025-01-18 16:52:10 +03:00
Primakov Alexandr Alexandrovich
fb644b6f7b create todo list 2025-01-18 16:50:58 +03:00
Primakov Alexandr Alexandrovich
d88e680413 todo auth 2025-01-18 15:44:14 +03:00
Primakov Alexandr Alexandrovich
8b7f43d15a mode todo in todo folder 2025-01-17 19:51:33 +03:00
b9edd0091c Merge pull request 'delete masters _id' (#60) from feature/arm-master-id into master
Reviewed-on: #60
2025-01-13 17:26:46 +03:00
RustamRu
558245f876 delete masters _id
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-01-12 11:12:24 +03:00
a927727c1b Merge pull request 'fix: change get for orders' (#59) from fix/orders-get into master
Reviewed-on: #59
2025-01-12 10:43:08 +03:00
a9d9aa02da fix: change get for orders
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2025-01-12 10:40:50 +03:00
e7451aea5b Merge pull request 'added stubs for kazan-explore sport quiz' (#58) from kazan-explore into master
Reviewed-on: #58
2025-01-11 20:27:32 +03:00
5cc580c3c5 added stubs for kazan-explore sport quiz 2025-01-11 20:25:17 +03:00
3fe62ec268 Merge pull request 'add auth in freetracker' (#57) from freetracker-add-auth into master
Reviewed-on: #57
2024-12-31 10:12:39 +03:00
e73f7e2dc9 add auth in freetracker
Some checks failed
platform/multy-stub/pipeline/head There was a failure building this commit
2024-12-31 10:11:17 +03:00
571c43c33c add sberhubproject 2024-12-28 11:02:11 +03:00
61c847b58c Merge pull request 'kfu-m-24-1/eng-it-lean' (#56) from kfu-m-24-1/eng-it-lean into master
Reviewed-on: #56
2024-12-28 10:24:59 +03:00
Ruslan Zagitov
4d621c8bbe chore: add new dictionary 2024-12-27 23:32:54 +03:00
Ruslan Zagitov
ab8a9ebc99 feat: add '/units' endpoints; add 'put' and 'delete' requests to '/dictionaries' endpoint 2024-12-27 23:15:26 +03:00
2d1a4ba8db Merge pull request 'fixing stub paths' (#55) from kazan-explore into master
Reviewed-on: #55
2024-12-27 23:01:16 +03:00
9ed6808838 fixing stub paths 2024-12-27 22:55:08 +03:00
8bd3ccfce7 Merge pull request 'kazan-explore stubs changed, added translation' (#54) from kazan-explore into master
Reviewed-on: #54
2024-12-27 22:41:23 +03:00
9818550b29 kazan-explore stubs changed, added translation 2024-12-27 22:15:06 +03:00
aaeii
fe8a477b27 Merge branch 'master' of https://git.bro-js.ru/bro-students/multy-stub 2024-12-27 21:30:20 +03:00
aaeii
12af9b7c10 добавили окно с просмотром игр 2024-12-27 21:29:26 +03:00
1871f3f96a Merge pull request 'Добавлены стабы для двуфакторной авторизации' (#53) from dogsitters-finder into master
Reviewed-on: #53
2024-12-26 23:21:53 +03:00
05be7c4a26 Merge branch 'master' into dogsitters-finder 2024-12-26 23:21:24 +03:00
aaeii
46c8147172 fixed json gamehub 2024-12-25 02:26:03 +03:00
271f7cab7d Добавлены стабы для двуфакторной авторизации 2024-12-25 00:43:36 +03:00
aaeii
50e105b851 gamehub stubs 2024-12-24 16:34:43 +03:00
aaeii
da201720c0 gamehub stubs 2024-12-23 23:56:43 +03:00
b3fd86da33 Merge pull request 'feat: add crud for Masters' (#52) from feature/crud-arm-master into master
Reviewed-on: #52
2024-12-22 11:04:54 +03:00
276ef4033b feat: add crud for Masters 2024-12-21 21:33:07 +03:00
Primakov Alexandr Alexandrovich
a520692bc5 log dir ignore 2024-12-21 14:17:55 +03:00
Primakov Alexandr Alexandrovich
a327c9caeb ignore logs 2024-12-21 14:17:38 +03:00
Primakov Alexandr Alexandrovich
9a8fddee3b empty logs dir 2024-12-21 14:15:00 +03:00
149d668bea Merge pull request 'Обновил express до 5 версии + логгер' (#51) from update into master
Reviewed-on: #51
2024-12-21 14:09:59 +03:00
Primakov Alexandr Alexandrovich
5d08c4c1c2 update version + logger
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-12-21 00:05:12 +03:00
2356259823 Merge pull request 'feat: add kfu-m-24-1 stubs folder; include eng-it-lean stubs api' (#50) from kfu-m-24-1/eng-it-lean into master
Reviewed-on: #50
Reviewed-by: nekitboy1998 <nekitboy1998@gmail.com>
2024-12-20 11:28:27 +03:00
qosquo
872c921a53 feat: add kfu-m-24-1 stubs folder; include eng-it-lean stubs api 2024-12-19 19:51:07 +03:00
10b5207f9a Merge pull request 'feat: add fetch masters and add model' (#49) from feature/dry-wash-masters into master
Reviewed-on: #49
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2024-12-15 20:02:41 +03:00
2ede62bcd8 Merge pull request 'added mock backend for sdk team' (#39) from sergepolin/multy-stub:sdk-team into master
Reviewed-on: #39
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2024-12-15 19:59:22 +03:00
1788f90cde feat: add fetch masters and add model
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-12-15 17:53:45 +03:00
a37f7ea8a8 Merge pull request 'dhs-testing stubs' (#48) from dhs-testing into master
Reviewed-on: #48
2024-12-14 10:36:37 +03:00
18b63bed21 dhs-testing stubs
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-12-14 10:33:28 +03:00
707c3be3ec Merge pull request 'feat: freetracker dashboard-performer stubs' (#46) from feat/freetracker into master
Reviewed-on: #46
2024-12-13 22:07:47 +03:00
3d52ef9d4c feat: freetracker dashboard-performer stubs
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-12-13 22:05:42 +03:00
42944af2d3 Merge pull request 'feat: add dry wash json' (#44) from feature/dry-wash-arm into master
Reviewed-on: #44
2024-12-08 11:52:50 +03:00
f0f6b78cd0 feat: add dry wash json 2024-12-08 11:50:39 +03:00
WlfromB
7c35f17008 fix require server.index.js 2024-12-07 09:55:00 +03:00
WlfromB
0208e29ae3 old edateam stubs 2024-12-07 09:49:53 +03:00
Primakov Alexandr Alexandrovich
4d5cd104ad Merge branch 'master' of ssh://85.143.175.152:222/bro-students/multy-stub 2024-12-01 21:55:32 +03:00
Primakov Alexandr Alexandrovich
6702473053 up mongo version 2024-12-01 21:47:55 +03:00
52083097a2 Merge pull request 'dogsitter-finder' (#43) from dogsitter-finder into master
Reviewed-on: #43
2024-11-30 16:06:15 +03:00
f7ac265e3b Replace users.json to users/ folder
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-11-30 16:04:59 +03:00
d46841c21f Update paths to json files 2024-11-30 14:54:07 +03:00
c95b015094 Merge pull request 'Update stubs DogsittersFinder' (#42) from dogsitter-finder into master
Reviewed-on: #42
2024-11-30 14:40:32 +03:00
940349af29 Update stubs DogsittersFinder 2024-11-30 12:16:27 +03:00
268824c108 Added multy stub for project kazan-explore 2024-11-26 19:49:01 +03:00
Primakov Alexandr Alexandrovich
550554a7a5 docker compose by tag 2024-11-25 22:40:47 +03:00
f5a8585845 Merge pull request 'Перемещена папка dogsitters-finder в routes. Добавлен путь в index.js' (#41) from dogsitters-finder-3 into master
Reviewed-on: #41
2024-11-25 21:22:24 +03:00
1e67f25066 Перемещена папка dogsitters-finder в routes. Добавлен путь в index.js 2024-11-25 20:42:38 +03:00
359a136dbf added mock backend for sdk team 2024-10-19 01:32:36 +03:00
bbc315e270 Merge pull request 'get count by modelname' (#38) from feature/check-jenkins into master
Reviewed-on: #38
2024-10-16 11:57:57 +03:00
Primakov Alexandr Alexandrovich
fbb5d26c8f get count by modelname
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-10-16 11:55:42 +03:00
9d3edcf0dd Merge pull request 'check' (#37) from feature/check-jenkins into master
Reviewed-on: #37
2024-10-16 11:38:09 +03:00
Primakov Alexandr Alexandrovich
57eb548d6c verbose 2024-10-16 11:37:47 +03:00
Primakov Alexandr Alexandrovich
34d2889c1d fix 2024-10-16 11:24:59 +03:00
Primakov Alexandr Alexandrovich
afc782f50f check 2024-10-16 11:15:18 +03:00
Primakov Alexandr Alexandrovich
ff6e688206 fix 2024-10-16 11:12:16 +03:00
Primakov Alexandr Alexandrovich
4b0d9b4dbc mongoose + tests 2024-10-16 11:06:23 +03:00
2cfcd7347b Merge pull request 'fix plantsRouter' (#35) from nekitboy1998-patch-1 into master
Reviewed-on: #35
2024-10-15 14:43:38 +03:00
c1fe275532 fix plantsRouter 2024-10-15 14:43:06 +03:00
de46e9bf50 Merge pull request 'eecliptica' (#34) from eecliptica into master
Reviewed-on: #34
2024-10-15 14:11:57 +03:00
bogap
76558a7eef remove imports 2024-10-15 14:08:47 +03:00
bogap
4bf3d662ec a 2024-10-15 13:38:49 +03:00
bogap
637939e9af corrected 2024-10-15 13:36:13 +03:00
bogap
02891fe301 corrected 2024-10-12 23:03:52 +03:00
6015bce32f Merge pull request 'Cats backend routes' (#30) from cats into master
Reviewed-on: #30
2024-10-12 13:23:38 +03:00
528b37246b Const file for token 2024-10-12 13:23:16 +03:00
0c693e1bac Cats backend routes 2024-10-12 13:04:51 +03:00
c77aa76645 Merge pull request 'fixed a route for epja-2024-1' (#29) from enterfront into master
Reviewed-on: #29
2024-10-12 12:08:41 +03:00
Nikolai Petukhov
8a0ea25029 fixed a route for epja-2024-1 2024-10-12 12:06:52 +03:00
6fb3f3f921 Merge pull request 'enterfront' (#28) from enterfront into master
Reviewed-on: #28
2024-10-12 11:33:43 +03:00
Nikolai Petukhov
89c9d7f901 fixed error code 2024-10-12 11:21:47 +03:00
Nikolai Petukhov
b215e22f53 fixed const key, logs, deleted example 2024-10-12 11:17:21 +03:00
Nikolai Petukhov
f13ae33cb4 added a route for epja-2024-1 2024-10-10 13:06:58 +03:00
Nikolai Petukhov
18a1095cf0 enterfront 2024-10-10 12:02:52 +03:00
Primakov Alexandr Alexandrovich
3e27c0110c docker compose up script fix 2024-08-23 16:38:07 +03:00
c2ada9072f Merge pull request 'school-stage stubs' (#27) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/27
2024-06-03 23:26:56 +03:00
1bd1d2b279 school-stage stubs 2024-06-03 23:26:23 +03:00
7b1ce2ae83 Merge pull request 'school-stage stubs' (#26) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/26
2024-06-03 23:20:29 +03:00
de22881c28 school-stage stubs 2024-06-03 23:19:56 +03:00
20d370f120 Merge pull request 'school-stage stubs' (#25) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/25
2024-06-03 19:02:09 +03:00
85986d1844 school-stage stubs 2024-06-03 19:00:44 +03:00
dccf769477 Merge pull request 'school-stage stubs' (#24) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/24
2024-06-02 20:31:21 +03:00
d088ef7af8 school-stage stubs 2024-06-02 20:30:51 +03:00
fad8cdfe08 Merge pull request 'school-stage stubs' (#23) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/23
2024-06-02 20:26:27 +03:00
a55e6d2ab2 school-stage stubs 2024-06-02 20:25:51 +03:00
eb6da8aa1b Merge pull request 'school-stage stubs' (#22) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/22
2024-06-02 20:16:40 +03:00
19a55f57c0 school-stage stubs 2024-06-02 20:15:01 +03:00
b649e86a43 Merge pull request 'stubs-kazan-explore' (#21) from stubs-kazan-explore into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/21
2024-06-02 15:28:00 +03:00
guzelkha
c53f016eec Merge branch 'stubs-kazan-explore' of ssh://85.143.175.152:222/bro-students/multy-stub into stubs-kazan-explore 2024-06-02 15:23:45 +03:00
guzelkha
0a7cbc3434 stubs-kazan-explore change 2024-06-02 15:23:16 +03:00
Liliya Vasilova
279650db25 change stubs kazan-explore 2024-06-02 15:15:34 +03:00
2d45b4af72 Change trip schedule stub 2024-06-02 14:15:35 +03:00
bd4de9d7ba Merge pull request 'Add trip schedule stubs kazan-explore' (#20) from stubs-kazan-explore into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/20
2024-06-02 13:20:37 +03:00
10dbe5c147 Add trip schedule stubs kazan-explore 2024-06-02 13:18:35 +03:00
435f17ee22 Merge pull request 'Add stubs kazan-explore' (#19) from stubs-kazan-explore into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/19
2024-06-01 20:40:27 +03:00
677dc3dc29 Add stubs kazan-explore 2024-06-01 20:37:32 +03:00
88e3fe4172 Merge pull request 'Add stubs kazan-explore' (#18) from stubs-kazan-explore into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/18
2024-06-01 20:34:05 +03:00
21dcc8bbec Add stubs kazan-explore 2024-06-01 20:32:45 +03:00
4778dba7ed Merge pull request 'stubs-kazan-explore' (#17) from stubs-kazan-explore into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/17
2024-06-01 20:25:16 +03:00
07a02ade1f Add stubs kazan-explore 2024-06-01 20:22:43 +03:00
311846f92d Add stubs kazan-explore 2024-06-01 19:53:28 +03:00
ebd561098f Merge pull request 'small changes' (#16) from dhs-testing into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/16
2024-06-01 14:14:00 +03:00
b4372eb53a small changes 2024-06-01 14:12:54 +03:00
bdb6b4ca3e Merge pull request 'schoo;-stage stubs' (#15) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/15
2024-06-01 09:54:28 +03:00
426cb70eb6 schoo;-stage stubs 2024-06-01 09:53:26 +03:00
61441e21b8 Merge pull request 'school-stage stubs' (#14) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/14
2024-06-01 09:51:42 +03:00
a6f61ba033 school-stage stubs 2024-06-01 09:51:14 +03:00
8588a7fa38 Merge pull request 'school-stage stubs' (#13) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/13
2024-06-01 00:40:16 +03:00
c35185ea32 school-stage stubs 2024-06-01 00:39:43 +03:00
78a332732d Merge pull request 'api' (#12) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/12
2024-06-01 00:01:29 +03:00
5f54355b97 api 2024-06-01 00:00:00 +03:00
4efbb56905 Merge pull request 'school-stage stubs' (#10) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/10
2024-05-31 23:56:37 +03:00
50c6286190 Merge pull request 'edit tests data' (#11) from dhs-testing into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/11
2024-05-31 23:32:50 +03:00
de29da93ba edit tests data 2024-05-31 23:31:21 +03:00
7cdd7e790f school-stage stubs 2024-05-31 22:04:23 +03:00
569b1b0d9e Merge pull request 'school-stage stubs' (#9) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/9
2024-05-31 18:03:52 +03:00
272961c583 school-stage stubs 2024-05-31 18:01:50 +03:00
63284d6c08 Merge pull request 'school-stage-branch' (#8) from school-stage-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/8
2024-05-31 16:49:59 +03:00
cb56e2dd2c school-stage stubs 2024-05-31 16:38:40 +03:00
325e2f125b school-stage stubs 2024-05-31 16:28:05 +03:00
786085d4d0 Merge pull request 'dhs-testing stubs' (#7) from dhs-testing into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/7
2024-05-30 18:51:51 +03:00
c95a00fb19 fixed json 2024-05-30 18:29:26 +03:00
95373069da dhs-testing stubs 2024-05-30 17:39:33 +03:00
b8275a4c8f Merge pull request 'add-dogsitters-finder' (#6) from add-dogsitters-finder into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/6
Reviewed-by: primakov <primakovpro@gmail.com>
2024-05-27 18:12:19 +03:00
fb868bfefc Change path to json 2024-05-26 16:29:12 +03:00
086c94c58a Update json/users.json 2024-05-26 16:28:54 +03:00
812a95dd85 Merge pull request 'my-project stubs' (#4) from my into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/4
Reviewed-by: primakov <primakovpro@gmail.com>
2024-05-25 12:50:19 +03:00
85ee64e92b Merge pull request 'back add' (#5) from edateam_branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/5
Reviewed-by: primakov <primakovpro@gmail.com>
2024-05-25 12:50:05 +03:00
nothingnowhere1
eb87f400ee edit json files 2024-05-25 12:44:44 +03:00
92cabfa048 Add dogsitters-finder to server/index.json and server/routers 2024-05-25 11:12:21 +03:00
NewPerson
b2a853e183 back add 2024-05-25 00:10:46 +03:00
nothingnowhere1
0a6d50cb60 stubs 2024-05-24 05:04:31 +03:00
7809806b83 Merge pull request 'webstar-project stubs api' (#3) from webstar-branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/3
Reviewed-by: primakov <primakovpro@gmail.com>
2024-05-22 22:47:01 +03:00
Deolys
1aa0c36c84 post login fixed 2024-05-22 22:42:58 +03:00
Deolys
7c3132c54b webstar-project stubs api 2024-05-22 15:11:46 +03:00
8fc85a7de8 Merge pull request 'fix problems with edateam stubs index.js' (#2) from edateam_branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/2
Reviewed-by: primakov <primakovpro@gmail.com>
2024-05-19 21:14:14 +03:00
NewPerson
cb8b2cc5aa fix problems with edateam stubs index.js 2024-05-19 21:07:33 +03:00
6651215eeb a bit refresh deployment 2024-05-19 20:50:15 +03:00
80f8cef142 Merge pull request 'edateam_branch' (#1) from edateam_branch into master
Reviewed-on: https://git.inno-js.ru/bro-students/multy-stub/pulls/1
Reviewed-by: primakov <primakovpro@gmail.com>
2024-05-19 12:48:51 +03:00
WlfromB
5a57291523 index.js + edateam app use 2024-05-19 03:04:19 +03:00
WlfromB
39ab269f07 edateam stubs add 2024-05-19 03:01:32 +03:00
7cb23080bf search examples 2024-05-18 15:31:34 +03:00
d74e4a8624 r-and-m jsons 2024-05-18 13:40:25 +03:00
1432 changed files with 27649 additions and 2332 deletions

View File

@@ -1,7 +1,7 @@
const ObjectId = require('mongodb').ObjectID
const getHash = require('pbkdf2-password')()
const { getDB } = require('../../utils/mongo')
const { getDB } = require('../../../utils/mongo')
const USERS_COLLECTION = 'users'
const LISTS_COLLECTION = 'lists'

Binary file not shown.

View File

@@ -1,4 +1,4 @@
const { getDB } = require('../../utils/mongo')
const { getDB } = require('../../../utils/mongo')
let db = null

View File

@@ -1,6 +1,6 @@
const router = require('express').Router();
const { getResponse } = require('../../../utils/common');
const { getResponse } = require('../../../../utils/common');
const {
getTags,
connect,

View File

@@ -1,7 +1,7 @@
const { v4: uuid } = require('uuid')
const ObjectId = require('mongodb').ObjectID
const { getDB } = require('../../utils/mongo')
const { getDB } = require('../../../utils/mongo')
const { _idToId, checkDB, _idToIdArray, filterId } = require('./utils')
let db = null

View File

@@ -0,0 +1,36 @@
const router = require('express').Router();
const checkPassword = require('pbkdf2-password')();
const jwt = require('jsonwebtoken');
const {EDATEAM_JWT_TOKEN} = require('./key');
const {getUser, _idToId, getResponse, requiredFields, signUp} = require('./controllers');
router.post('/sign-in', requiredFields(['email','password']), async (req, res)=>{
try{
const user = await getUser(req.body);
checkPassword({password:req.body.password, salt:user.salt},async(err, pass, salt, hash )=>{
if(err){
throw new Error(err);
}
if(user.password === hash){
const {password, salt:_salt, ...rest} = user;
const token = jwt.sign(_idToId(rest), EDATEAM_JWT_TOKEN);
return res.send(getResponse(null, token));
}
return res.status(400).send(getResponse('Wrong email or password!'));
} )
}
catch(error){
res.status(400).send(getResponse(error.message));
}
});
router.post('/sign-up', requiredFields(['email', 'login', 'password']), async (req, res) => {
let error = null
const data = await signUp(req.body).catch((e) => error = e.message)
return res.status(error ? 400 : 200).send(getResponse(error, data))
})
module.exports = router;

View File

@@ -0,0 +1,217 @@
const ObjectId = require('mongodb').ObjectId;
const getHash = require('pbkdf2-password')();
const { getDB } = require('../../../utils/mongo');
const USERS_COLLECTION = 'users';
const RECIPES_COLLECTION = 'recipes_collection';
const FAVORITES_USER = 'favorites_user'
let db =null;
const connect = async () => {
db = await getDB('edateam');
};
const init = async () => {
await connect();
};
init();
const _idToId = (data) => {
const { _id, ...rest } = data;
return {
id: _id,
...rest
};
}
const _idToArray = (data) => {
const _idToMap = data.map((item) => _idToId(item));
return _idToMap;
}
const getResponse = (error, data, success = true) => {
if (error) {
return {
success: false,
error,
}
}
return {
success,
data,
}
}
const signUp = async ({ email, login, password }) => {
try {
db = await getDB('edateam');
const userCollection = db.collection(USERS_COLLECTION);
const userData = await userCollection.findOne({
$or: [
{ login },
{ email }
]
})
if (userData?.login === login) {
throw new Error('This login already in db!\nPlease come up with another login!');
}
if (userData?.email === email) {
throw new Error('This email already in db!\nPlease come up with another email!');
}
return new Promise((resolve, reject) => {
getHash({ password }, async (err, pass, salt, hash) => {
if (err) {
return reject(err);
}
const insertedCount = await userCollection.insertOne({ email, login, password: hash, salt });
if (!insertedCount) {
return reject(new Error('Insert error!'));
}
resolve({});
});
});
} catch (error) {
console.error(error);
throw error;
}
};
const getUser = async ({ email }) => {
if (db === null) {
throw new Error('no db connection :((');
}
try {
const userCollection = db.collection(USERS_COLLECTION);
const userData = await userCollection.findOne({ email });
if (userData) {
return userData;
}
throw new Error('Wrong email or password!');
} catch (error) {
throw new Error(error);
}
}
const getListRecipes = async () => {
try {
db = await getDB('edateam');
const recipesCollection = db.collection(RECIPES_COLLECTION);
const recipesData = await recipesCollection.find().toArray();
if (recipesData.length > 0) {
return _idToArray(recipesData);
} else {
throw new Error('No recipes found in the database!');
}
} catch (error) {
console.error('Error in getListRecipes:', error.message);
throw new Error(error.message);
}
};
const getRecipe = async (dishId ) => {
try {
db = await getDB('edateam');
const recipesCollection = db.collection(RECIPES_COLLECTION);
const id = dishId.id;
const recipeData = await recipesCollection.findOne({ _id :new ObjectId(id) } );
if (recipeData!=null) {
return _idToId(recipeData);
}
throw new Error('Not found recipe');
} catch (error) {
throw new Error(error);
}
}
const addRecipe = async (recipe) => {
try {
db = await getDB('edateam');
const recipesCollection = db.collection(RECIPES_COLLECTION);
const result = await recipesCollection.insertOne(recipe);
if (!result.insertedId) {
throw new Error('Recipe insertion failed');
}
return {
success: true,
id: result.insertedId
};
} catch (error) {
console.error('Error in addRecipe:', error.message);
throw new Error(error.message);
}
};
const requiredFields = (fields) => (req, res, next) => {
// eslint-disable-next-line no-restricted-syntax
for (const fieldName of fields) {
if (!req.body[fieldName]) {
throw new Error(`Параметр ${fieldName} не установлен`)
}
}
next()
}
const addFavorite = async (userId, recipeId) => {
try {
db = await getDB('edateam');
const favoritesCollection = db.collection(FAVORITES_USER);
const result = await favoritesCollection.updateOne(
{ userId: new ObjectId(userId) },
{ $addToSet: { favorites: new ObjectId(recipeId) } },
{ upsert: true }
);
return result;
} catch (error) {
throw new Error('Error adding favorite: ' + error.message);
}
};
const getFavorites = async (userId) => {
try {
db = await getDB('edateam');
const favoritesCollection = db.collection(FAVORITES_USER);
const userFavorites = await favoritesCollection.findOne({ userId: new ObjectId(userId) });
if (!userFavorites || !userFavorites.favorites || userFavorites.favorites.length === 0) {
return [];
}
const recipesCollection = db.collection(RECIPES_COLLECTION);
const favoriteRecipes = await recipesCollection.find({ _id: { $in: userFavorites.favorites } }).toArray();
return favoriteRecipes;
} catch (error) {
console.error(error);
throw new Error("Failed to get user favorites with recipes");
}
};
module.exports = {
getUser,
signUp,
getResponse,
_idToId,
_idToArray,
getListRecipes,
getRecipe,
addRecipe,
requiredFields,
getFavorites,
addFavorite
};

View File

@@ -0,0 +1,25 @@
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.post('/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'));
});
router.use('/auth', require('./auth'));
router.use('/recipe', require('./user'));
router.use('/main', require('./main'));
module.exports = router;

View File

@@ -0,0 +1,76 @@
{
"data": [
{
"src": "pancakes_meat",
"alt": "Фотография блинчиков с мясом, сыром и луком",
"href": "?=dish01",
"name": "Блинчики с мясом, сыром и лучком"
},
{
"src": "cheesecakes",
"alt": "Фотография сырников из творога",
"href": "?=dish02",
"name": "Сырники из творога"
},
{
"src": "borsch",
"alt": "Фотография борща",
"href": "?=dish03",
"name": "Борщ"
},
{
"src": "vareniki",
"alt": "Фотография вареников",
"href": "?=dish04",
"name": "Ленивые вареники"
},
{
"src": "rice_porridge",
"alt": "Фотография рисовой каши",
"href": "?=dish05",
"name": "Рисовая каша"
},
{
"src": "cutlets",
"alt": "Фотография котлет по-киевски",
"href": "?=dish06",
"name": "Котлеты по-киевски"
},
{
"src": "draniki",
"alt": "Фотография драников",
"href": "?=dish07",
"name": "Драники"
},
{
"src": "meringue",
"alt": "Фотография безе",
"href": "?=dish08",
"name": "Безе"
},
{
"src": "goulash",
"alt": "Фотография гуляша",
"href": "?=dish09",
"name": "Гуляш"
},
{
"src": "pancakes_cherries",
"alt": "Фотография блинчиков с вишней и творожным сыром",
"href": "?=dish10",
"name": "Блинчики с вишней и творожным сыром"
},
{
"src": "canned_soup",
"alt": "Фотография супа из рыбных консервов",
"href": "?=dish11",
"name": "Суп из рыбных консервов"
},
{
"src": "salad",
"alt": "Фотография салата",
"href": "?=dish12",
"name": "Салат \"Весенний\""
}
]
}

View File

@@ -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" }
]
}

View File

@@ -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"
}
]
}
}

View File

@@ -0,0 +1,3 @@
const EDATEAM_JWT_TOKEN = 'secretyk token';
module.exports = {EDATEAM_JWT_TOKEN};

View File

@@ -0,0 +1,51 @@
const { getListRecipes , getRecipe, addFavorite , getFavorites} = require('./controllers');
const router = require('express').Router();
router.get('/recipes', async (req, res) => {
try {
const result = await getListRecipes();
return res.status(200).json({ success: true, data: result });
} catch (error) {
console.error('Error in GET /recipes:', error.message);
return res.status(500).json({ success: false, message: error.message });
}
});
router.post('/recipe', async(req,res)=>{
try{
const result = await getRecipe(req.body);
return res.status(200).json({success:true, data: result});
}
catch(error){
console.error('Error in GET /recipes:', error.message);
return res.status(500).json({ success: false, message: error.message });
}
})
router.post('/favorites', async (req, res) => {
try {
const { userId, recipeId } = req.body;
const result = await addFavorite(userId, recipeId);
return res.status(200).json({ success: true, data: result });
} catch (error) {
console.error('Error in POST /favorites:', error.message);
return res.status(500).json({ success: false, message: error.message });
}
});
router.post('/get-favorites', async(req,res) =>{
try {
const { userId } = req.body;
const result = await getFavorites(userId);
console.log(result)
return res.status(200).json({ success: true, data: result });
} catch (error) {
console.error('Error in POST /get-favorites:', error.message);
return res.status(500).json({ success: false, message: error.message });
}
});
module.exports = router;

View File

@@ -0,0 +1,35 @@
const { requiredFields , getFavorites, addRecipe} = require('./controllers');
const router = require('express').Router();
router.post('/favorites', requiredFields('id'), async(req,res)=>{
try{
const recipes = await getFavorites(req.body);
res.status(200).send(getResponse(recipes));
}
catch(error){
res.status(400).send(getResponse(error.message));
}
})
router.post('/add-recept', async (req, res) => {
let error = null;
let result = null;
try {
result = await addRecipe(req.body);
} catch (e) {
error = e.message;
}
if (error) {
console.error(`Error in POST /add-recept: ${error}`);
}
return res.status(error ? 500 : 201).json({
message: error ? error : 'Recipe added successfully',
id: result?.id
});
});
module.exports = router;

Some files were not shown because too many files have changed in this diff Show More