Merge branch 'master' of http://khuhub.khu.ac.kr/2021105655/ossw-project into front
# Conflicts: # client/package.json # package-lock.json # package.json
Showing
7 changed files
with
991 additions
and
174 deletions
1 | +# How to Install | ||
2 | +``` | ||
3 | +npm install && cd client && npm install && cd ../ | ||
4 | +``` | ||
5 | + | ||
6 | +# How to Start | ||
7 | +``` | ||
8 | +npm start | ||
9 | +``` | ||
10 | + | ||
1 | # 학식 관련된 의견 주고 받는 커뮤니티 | 11 | # 학식 관련된 의견 주고 받는 커뮤니티 |
2 | > 친구의 부탁으로 인해 현재 제2기숙사와 학생회관의 학식을 보여주는 앱을 개발했습니다. | 12 | > 친구의 부탁으로 인해 현재 제2기숙사와 학생회관의 학식을 보여주는 앱을 개발했습니다. |
3 | > 이와 관련된 반응을 에브리타임 앱에서 보고 있었습니다. | 13 | > 이와 관련된 반응을 에브리타임 앱에서 보고 있었습니다. |
... | @@ -20,4 +30,171 @@ | ... | @@ -20,4 +30,171 @@ |
20 | * 카카오톡의 반응 기능이나 인스타의 좋아요 처럼 게시물에 이모티콘을 사용자가 표시하는 기능 | 30 | * 카카오톡의 반응 기능이나 인스타의 좋아요 처럼 게시물에 이모티콘을 사용자가 표시하는 기능 |
21 | ```한 사용자가 여러번 남기는 것을 막아야 해서 로그인 기능 고려 필요``` | 31 | ```한 사용자가 여러번 남기는 것을 막아야 해서 로그인 기능 고려 필요``` |
22 | * 게시물 작성을 유도하기 위해 포인트 적립을 통해 랭킹 기능 고려 | 32 | * 게시물 작성을 유도하기 위해 포인트 적립을 통해 랭킹 기능 고려 |
23 | -* 작성된 글을 보기 쉽도록 게시글을 검색하는 기능 | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
33 | +* 작성된 글을 보기 쉽도록 게시글을 검색하는 기능 | ||
34 | + | ||
35 | +# BACK | ||
36 | +## 게시물 | ||
37 | +### /api/getList | ||
38 | +#### GET호출 | ||
39 | +> response | ||
40 | +> ``` | ||
41 | +> ["게시물 id1", "게시물 id2", "게시물 id3"] | ||
42 | +>``` | ||
43 | +>> 오늘 게시물들의 아이디 표시 | ||
44 | + | ||
45 | +------------- | ||
46 | +### /api/getList/:date | ||
47 | +#### GET호출 | ||
48 | +> response | ||
49 | +> ``` | ||
50 | +> ["게시물 id1", "게시물 id2", "게시물 id3"] | ||
51 | +>``` | ||
52 | +>> 특정 날자의 게시물들의 아이디 표시 | ||
53 | + | ||
54 | +------------- | ||
55 | +### /api/get | ||
56 | +#### GET호출 | ||
57 | +> request(body) | ||
58 | +> ``` | ||
59 | +> { | ||
60 | +> "idArray": ["게시물 id1", "게시물 id2", "게시물 id3"] | ||
61 | +> } | ||
62 | +> ``` | ||
63 | + | ||
64 | +> response | ||
65 | +> ``` | ||
66 | +> [ | ||
67 | +> { | ||
68 | +> "id": "게시물 id1", | ||
69 | +> "title": "제목1", | ||
70 | +> "content": "내용1" | ||
71 | +> }, | ||
72 | +> { | ||
73 | +> "id": "게시물 id2", | ||
74 | +> "title": "제목2", | ||
75 | +> "content": "내용2" | ||
76 | +> }, | ||
77 | +> { | ||
78 | +> "id": "게시물 id3", | ||
79 | +> "title": "제목3", | ||
80 | +> "content": "이 것은 긴 내용이..." | ||
81 | +> } | ||
82 | +> ] | ||
83 | +> ``` | ||
84 | +>> 특정 id(여러개)의 게시물 내용 요약 불러오기 | ||
85 | + | ||
86 | +------------- | ||
87 | +### /api/get/:id | ||
88 | +#### GET호출 | ||
89 | +> response | ||
90 | +> ``` | ||
91 | +> { | ||
92 | +> "title": "제목", | ||
93 | +> "content": "내용" | ||
94 | +> } | ||
95 | +>``` | ||
96 | +>> 특정 id의 게시물 불러오기 | ||
97 | + | ||
98 | +------------- | ||
99 | +### /api/isPassEqual | ||
100 | +#### POST호출 | ||
101 | +> request(body) | ||
102 | +> ``` | ||
103 | +> { | ||
104 | +> "id":"게시물 id", | ||
105 | +> "password":"사용자가 입력한 암호" | ||
106 | +> } | ||
107 | +> ``` | ||
108 | + | ||
109 | +> response | ||
110 | +> ``` | ||
111 | +> success | ||
112 | +> ``` | ||
113 | +> or | ||
114 | +> ``` | ||
115 | +> failed | ||
116 | +> ``` | ||
117 | +> | ||
118 | +>> 암호가 같으면 success, 아니면 failed | ||
119 | + | ||
120 | +------------- | ||
121 | +### /api/postSave | ||
122 | +#### POST호출 | ||
123 | +> request(body) | ||
124 | +> ``` | ||
125 | +> { | ||
126 | +> "title":"제목", | ||
127 | +> "content":"게시물 내용", | ||
128 | +> "password":"암호" | ||
129 | +> } | ||
130 | +> ``` | ||
131 | +>> 오늘 게시물 작성 | ||
132 | + | ||
133 | +## 대기시간 | ||
134 | +### /api/waiting | ||
135 | +#### GET호출 | ||
136 | +> response | ||
137 | +> ``` | ||
138 | +> [ | ||
139 | +> { | ||
140 | +> "value": "대기시간1", | ||
141 | +> "time": "12:34" | ||
142 | +> } | ||
143 | +> ] | ||
144 | +>``` | ||
145 | +>> 오늘의 대기시간 목록 가져오기 | ||
146 | + | ||
147 | +------------- | ||
148 | +### /api/waiting | ||
149 | +#### POST호출 | ||
150 | +> request(body) | ||
151 | +> ``` | ||
152 | +> { | ||
153 | +> "value":"대기시간2", | ||
154 | +> } | ||
155 | +> ``` | ||
156 | +> response | ||
157 | +> ``` | ||
158 | +> [ | ||
159 | +> { | ||
160 | +> "value": "대기시간1", | ||
161 | +> "time": "12:34" | ||
162 | +> }, | ||
163 | +> { | ||
164 | +> "value": "대기시간2", | ||
165 | +> "time": "13:57" | ||
166 | +> } | ||
167 | +> ] | ||
168 | +>``` | ||
169 | +>> 오늘의 대기시간 추가 | ||
170 | + | ||
171 | +## 제2기숙사 학식 메뉴 | ||
172 | +### /api/menuList | ||
173 | +#### GET호출 | ||
174 | +> response | ||
175 | +> ``` | ||
176 | +> { | ||
177 | +> "fo_date": [ | ||
178 | +> "2022-05-30", | ||
179 | +> "2022-05-31", | ||
180 | +> "2022-06-01", | ||
181 | +> "2022-06-02", | ||
182 | +> "2022-06-03" | ||
183 | +> ], | ||
184 | +> "fo_menu_lun": [ | ||
185 | +> "도시락: 고추장불고기,근대된장국,도토리묵무침,미역줄기볶음,배추김치", | ||
186 | +> "도시락: 치즈함박스테이크,쇠고기스프,양상추샐러드,햄채소볶음밥,오이피클,배추김치", | ||
187 | +> "운영없음", | ||
188 | +> "도시락: 王소시지&카레라이스,다시마무챗국,만두튀김,단무지무침,배추김치", | ||
189 | +> "도시락: 돈까스마요덮밥,매운콩나물국,카레크로켓,마카로니샐러드,볶음김치" | ||
190 | +> ], | ||
191 | +> "fo_menu_eve": [ | ||
192 | +> "도시락: 참치김치찌개,꼬마돈가스,돌자반볶음,단무지,쌀밥", | ||
193 | +> "도시락: 비빔우동&납작만두,유부장국,완자전,무말랭이무침,배추김치", | ||
194 | +> "운영없음", | ||
195 | +> "도시락: 치즈데리야끼불고기볶음밥,떡강정,양배추콘샐러드,배추김치,탄산음료", | ||
196 | +> "운영없음" | ||
197 | +> ] | ||
198 | +> } | ||
199 | +>``` | ||
200 | +>> 제2기숙사 학식 메뉴 일주일치 가져오기 | ... | ... |
... | @@ -7,6 +7,7 @@ | ... | @@ -7,6 +7,7 @@ |
7 | "@testing-library/react": "^13.3.0", | 7 | "@testing-library/react": "^13.3.0", |
8 | "@testing-library/user-event": "^13.5.0", | 8 | "@testing-library/user-event": "^13.5.0", |
9 | "bootstrap": "^5.1.3", | 9 | "bootstrap": "^5.1.3", |
10 | + "axios": "^0.27.2", | ||
10 | "react": "^18.1.0", | 11 | "react": "^18.1.0", |
11 | "react-bootstrap": "^2.4.0", | 12 | "react-bootstrap": "^2.4.0", |
12 | "react-dom": "^18.1.0", | 13 | "react-dom": "^18.1.0", | ... | ... |
... | @@ -6,74 +6,13 @@ | ... | @@ -6,74 +6,13 @@ |
6 | "": { | 6 | "": { |
7 | "dependencies": { | 7 | "dependencies": { |
8 | "axios": "^0.27.2", | 8 | "axios": "^0.27.2", |
9 | - "bootstrap": "^5.1.3", | 9 | + "body-parser": "^1.20.0", |
10 | "concurrently": "^7.2.1", | 10 | "concurrently": "^7.2.1", |
11 | "express": "^4.18.1", | 11 | "express": "^4.18.1", |
12 | "http-proxy-middleware": "^2.0.6", | 12 | "http-proxy-middleware": "^2.0.6", |
13 | + "mongoose": "^6.3.4", | ||
13 | "nodemon": "^2.0.16", | 14 | "nodemon": "^2.0.16", |
14 | - "react-bootstrap": "^2.4.0" | 15 | + "xhr2": "^0.2.1" |
15 | - } | ||
16 | - }, | ||
17 | - "node_modules/@babel/runtime": { | ||
18 | - "version": "7.18.3", | ||
19 | - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz", | ||
20 | - "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", | ||
21 | - "dependencies": { | ||
22 | - "regenerator-runtime": "^0.13.4" | ||
23 | - }, | ||
24 | - "engines": { | ||
25 | - "node": ">=6.9.0" | ||
26 | - } | ||
27 | - }, | ||
28 | - "node_modules/@popperjs/core": { | ||
29 | - "version": "2.11.5", | ||
30 | - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz", | ||
31 | - "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==", | ||
32 | - "funding": { | ||
33 | - "type": "opencollective", | ||
34 | - "url": "https://opencollective.com/popperjs" | ||
35 | - } | ||
36 | - }, | ||
37 | - "node_modules/@restart/hooks": { | ||
38 | - "version": "0.4.7", | ||
39 | - "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.7.tgz", | ||
40 | - "integrity": "sha512-ZbjlEHcG+FQtpDPHd7i4FzNNvJf2enAwZfJbpM8CW7BhmOAbsHpZe3tsHwfQUrBuyrxWqPYp2x5UMnilWcY22A==", | ||
41 | - "dependencies": { | ||
42 | - "dequal": "^2.0.2" | ||
43 | - }, | ||
44 | - "peerDependencies": { | ||
45 | - "react": ">=16.8.0" | ||
46 | - } | ||
47 | - }, | ||
48 | - "node_modules/@restart/ui": { | ||
49 | - "version": "1.2.0", | ||
50 | - "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.2.0.tgz", | ||
51 | - "integrity": "sha512-oIh2t3tG8drZtZ9SlaV5CY6wGsUViHk8ZajjhcI+74IQHyWy+AnxDv8rJR5wVgsgcgrPBUvGNkC1AEdcGNPaLQ==", | ||
52 | - "dependencies": { | ||
53 | - "@babel/runtime": "^7.13.16", | ||
54 | - "@popperjs/core": "^2.10.1", | ||
55 | - "@react-aria/ssr": "^3.0.1", | ||
56 | - "@restart/hooks": "^0.4.0", | ||
57 | - "@types/warning": "^3.0.0", | ||
58 | - "dequal": "^2.0.2", | ||
59 | - "dom-helpers": "^5.2.0", | ||
60 | - "uncontrollable": "^7.2.1", | ||
61 | - "warning": "^4.0.3" | ||
62 | - }, | ||
63 | - "peerDependencies": { | ||
64 | - "react": ">=16.14.0", | ||
65 | - "react-dom": ">=16.14.0" | ||
66 | - } | ||
67 | - }, | ||
68 | - "node_modules/@restart/ui/node_modules/@react-aria/ssr": { | ||
69 | - "version": "3.1.2", | ||
70 | - "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.1.2.tgz", | ||
71 | - "integrity": "sha512-amXY11ImpokvkTMeKRHjsSsG7v1yzzs6yeqArCyBIk60J3Yhgxwx9Cah+Uu/804ATFwqzN22AXIo7SdtIaMP+g==", | ||
72 | - "dependencies": { | ||
73 | - "@babel/runtime": "^7.6.2" | ||
74 | - }, | ||
75 | - "peerDependencies": { | ||
76 | - "react": "^16.8.0 || ^17.0.0-rc.1" | ||
77 | } | 16 | } |
78 | }, | 17 | }, |
79 | "node_modules/@sindresorhus/is": { | 18 | "node_modules/@sindresorhus/is": { |
... | @@ -108,39 +47,20 @@ | ... | @@ -108,39 +47,20 @@ |
108 | "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", | 47 | "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", |
109 | "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==" | 48 | "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==" |
110 | }, | 49 | }, |
111 | - "node_modules/@types/prop-types": { | 50 | + "node_modules/@types/webidl-conversions": { |
112 | - "version": "15.7.5", | 51 | + "version": "6.1.1", |
113 | - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", | 52 | + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", |
114 | - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" | 53 | + "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" |
115 | }, | 54 | }, |
116 | - "node_modules/@types/react": { | 55 | + "node_modules/@types/whatwg-url": { |
117 | - "version": "18.0.9", | 56 | + "version": "8.2.1", |
118 | - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz", | 57 | + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz", |
119 | - "integrity": "sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw==", | 58 | + "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==", |
120 | "dependencies": { | 59 | "dependencies": { |
121 | - "@types/prop-types": "*", | 60 | + "@types/node": "*", |
122 | - "@types/scheduler": "*", | 61 | + "@types/webidl-conversions": "*" |
123 | - "csstype": "^3.0.2" | ||
124 | } | 62 | } |
125 | }, | 63 | }, |
126 | - "node_modules/@types/react-transition-group": { | ||
127 | - "version": "4.4.4", | ||
128 | - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", | ||
129 | - "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", | ||
130 | - "dependencies": { | ||
131 | - "@types/react": "*" | ||
132 | - } | ||
133 | - }, | ||
134 | - "node_modules/@types/scheduler": { | ||
135 | - "version": "0.16.2", | ||
136 | - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", | ||
137 | - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" | ||
138 | - }, | ||
139 | - "node_modules/@types/warning": { | ||
140 | - "version": "3.0.0", | ||
141 | - "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz", | ||
142 | - "integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA==" | ||
143 | - }, | ||
144 | "node_modules/abbrev": { | 64 | "node_modules/abbrev": { |
145 | "version": "1.1.1", | 65 | "version": "1.1.1", |
146 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", | 66 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", |
... | @@ -224,6 +144,25 @@ | ... | @@ -224,6 +144,25 @@ |
224 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", | 144 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", |
225 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" | 145 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" |
226 | }, | 146 | }, |
147 | + "node_modules/base64-js": { | ||
148 | + "version": "1.5.1", | ||
149 | + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", | ||
150 | + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", | ||
151 | + "funding": [ | ||
152 | + { | ||
153 | + "type": "github", | ||
154 | + "url": "https://github.com/sponsors/feross" | ||
155 | + }, | ||
156 | + { | ||
157 | + "type": "patreon", | ||
158 | + "url": "https://www.patreon.com/feross" | ||
159 | + }, | ||
160 | + { | ||
161 | + "type": "consulting", | ||
162 | + "url": "https://feross.org/support" | ||
163 | + } | ||
164 | + ] | ||
165 | + }, | ||
227 | "node_modules/binary-extensions": { | 166 | "node_modules/binary-extensions": { |
228 | "version": "2.2.0", | 167 | "version": "2.2.0", |
229 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", | 168 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", |
... | @@ -308,6 +247,40 @@ | ... | @@ -308,6 +247,40 @@ |
308 | "node": ">=8" | 247 | "node": ">=8" |
309 | } | 248 | } |
310 | }, | 249 | }, |
250 | + "node_modules/bson": { | ||
251 | + "version": "4.6.4", | ||
252 | + "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.4.tgz", | ||
253 | + "integrity": "sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ==", | ||
254 | + "dependencies": { | ||
255 | + "buffer": "^5.6.0" | ||
256 | + }, | ||
257 | + "engines": { | ||
258 | + "node": ">=6.9.0" | ||
259 | + } | ||
260 | + }, | ||
261 | + "node_modules/buffer": { | ||
262 | + "version": "5.7.1", | ||
263 | + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", | ||
264 | + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", | ||
265 | + "funding": [ | ||
266 | + { | ||
267 | + "type": "github", | ||
268 | + "url": "https://github.com/sponsors/feross" | ||
269 | + }, | ||
270 | + { | ||
271 | + "type": "patreon", | ||
272 | + "url": "https://www.patreon.com/feross" | ||
273 | + }, | ||
274 | + { | ||
275 | + "type": "consulting", | ||
276 | + "url": "https://feross.org/support" | ||
277 | + } | ||
278 | + ], | ||
279 | + "dependencies": { | ||
280 | + "base64-js": "^1.3.1", | ||
281 | + "ieee754": "^1.1.13" | ||
282 | + } | ||
283 | + }, | ||
311 | "node_modules/bytes": { | 284 | "node_modules/bytes": { |
312 | "version": "3.1.2", | 285 | "version": "3.1.2", |
313 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", | 286 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", |
... | @@ -666,6 +639,14 @@ | ... | @@ -666,6 +639,14 @@ |
666 | "node": ">=0.4.0" | 639 | "node": ">=0.4.0" |
667 | } | 640 | } |
668 | }, | 641 | }, |
642 | + "node_modules/denque": { | ||
643 | + "version": "2.0.1", | ||
644 | + "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", | ||
645 | + "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==", | ||
646 | + "engines": { | ||
647 | + "node": ">=0.10" | ||
648 | + } | ||
649 | + }, | ||
669 | "node_modules/depd": { | 650 | "node_modules/depd": { |
670 | "version": "2.0.0", | 651 | "version": "2.0.0", |
671 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", | 652 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", |
... | @@ -1099,6 +1080,25 @@ | ... | @@ -1099,6 +1080,25 @@ |
1099 | "node": ">=0.10.0" | 1080 | "node": ">=0.10.0" |
1100 | } | 1081 | } |
1101 | }, | 1082 | }, |
1083 | + "node_modules/ieee754": { | ||
1084 | + "version": "1.2.1", | ||
1085 | + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", | ||
1086 | + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", | ||
1087 | + "funding": [ | ||
1088 | + { | ||
1089 | + "type": "github", | ||
1090 | + "url": "https://github.com/sponsors/feross" | ||
1091 | + }, | ||
1092 | + { | ||
1093 | + "type": "patreon", | ||
1094 | + "url": "https://www.patreon.com/feross" | ||
1095 | + }, | ||
1096 | + { | ||
1097 | + "type": "consulting", | ||
1098 | + "url": "https://feross.org/support" | ||
1099 | + } | ||
1100 | + ] | ||
1101 | + }, | ||
1102 | "node_modules/ignore-by-default": { | 1102 | "node_modules/ignore-by-default": { |
1103 | "version": "1.0.1", | 1103 | "version": "1.0.1", |
1104 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", | 1104 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", |
... | @@ -1133,13 +1133,10 @@ | ... | @@ -1133,13 +1133,10 @@ |
1133 | "node": ">=10" | 1133 | "node": ">=10" |
1134 | } | 1134 | } |
1135 | }, | 1135 | }, |
1136 | - "node_modules/invariant": { | 1136 | + "node_modules/ip": { |
1137 | - "version": "2.2.4", | 1137 | + "version": "1.1.8", |
1138 | - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", | 1138 | + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", |
1139 | - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", | 1139 | + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==" |
1140 | - "dependencies": { | ||
1141 | - "loose-envify": "^1.0.0" | ||
1142 | - } | ||
1143 | }, | 1140 | }, |
1144 | "node_modules/ipaddr.js": { | 1141 | "node_modules/ipaddr.js": { |
1145 | "version": "1.9.1", | 1142 | "version": "1.9.1", |
... | @@ -1279,6 +1276,11 @@ | ... | @@ -1279,6 +1276,11 @@ |
1279 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", | 1276 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", |
1280 | "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==" | 1277 | "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==" |
1281 | }, | 1278 | }, |
1279 | + "node_modules/kareem": { | ||
1280 | + "version": "2.3.5", | ||
1281 | + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz", | ||
1282 | + "integrity": "sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg==" | ||
1283 | + }, | ||
1282 | "node_modules/keyv": { | 1284 | "node_modules/keyv": { |
1283 | "version": "3.1.0", | 1285 | "version": "3.1.0", |
1284 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", | 1286 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", |
... | @@ -1363,6 +1365,12 @@ | ... | @@ -1363,6 +1365,12 @@ |
1363 | "node": ">= 0.6" | 1365 | "node": ">= 0.6" |
1364 | } | 1366 | } |
1365 | }, | 1367 | }, |
1368 | + "node_modules/memory-pager": { | ||
1369 | + "version": "1.5.0", | ||
1370 | + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", | ||
1371 | + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", | ||
1372 | + "optional": true | ||
1373 | + }, | ||
1366 | "node_modules/merge-descriptors": { | 1374 | "node_modules/merge-descriptors": { |
1367 | "version": "1.0.1", | 1375 | "version": "1.0.1", |
1368 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", | 1376 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", |
... | @@ -1442,6 +1450,98 @@ | ... | @@ -1442,6 +1450,98 @@ |
1442 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", | 1450 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", |
1443 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" | 1451 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" |
1444 | }, | 1452 | }, |
1453 | + "node_modules/mongodb": { | ||
1454 | + "version": "4.5.0", | ||
1455 | + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz", | ||
1456 | + "integrity": "sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA==", | ||
1457 | + "dependencies": { | ||
1458 | + "bson": "^4.6.2", | ||
1459 | + "denque": "^2.0.1", | ||
1460 | + "mongodb-connection-string-url": "^2.5.2", | ||
1461 | + "socks": "^2.6.2" | ||
1462 | + }, | ||
1463 | + "engines": { | ||
1464 | + "node": ">=12.9.0" | ||
1465 | + }, | ||
1466 | + "optionalDependencies": { | ||
1467 | + "saslprep": "^1.0.3" | ||
1468 | + } | ||
1469 | + }, | ||
1470 | + "node_modules/mongodb-connection-string-url": { | ||
1471 | + "version": "2.5.2", | ||
1472 | + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz", | ||
1473 | + "integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==", | ||
1474 | + "dependencies": { | ||
1475 | + "@types/whatwg-url": "^8.2.1", | ||
1476 | + "whatwg-url": "^11.0.0" | ||
1477 | + } | ||
1478 | + }, | ||
1479 | + "node_modules/mongoose": { | ||
1480 | + "version": "6.3.4", | ||
1481 | + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz", | ||
1482 | + "integrity": "sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw==", | ||
1483 | + "dependencies": { | ||
1484 | + "bson": "^4.6.2", | ||
1485 | + "kareem": "2.3.5", | ||
1486 | + "mongodb": "4.5.0", | ||
1487 | + "mpath": "0.9.0", | ||
1488 | + "mquery": "4.0.3", | ||
1489 | + "ms": "2.1.3", | ||
1490 | + "sift": "16.0.0" | ||
1491 | + }, | ||
1492 | + "engines": { | ||
1493 | + "node": ">=12.0.0" | ||
1494 | + }, | ||
1495 | + "funding": { | ||
1496 | + "type": "opencollective", | ||
1497 | + "url": "https://opencollective.com/mongoose" | ||
1498 | + } | ||
1499 | + }, | ||
1500 | + "node_modules/mongoose/node_modules/ms": { | ||
1501 | + "version": "2.1.3", | ||
1502 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", | ||
1503 | + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" | ||
1504 | + }, | ||
1505 | + "node_modules/mpath": { | ||
1506 | + "version": "0.9.0", | ||
1507 | + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", | ||
1508 | + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", | ||
1509 | + "engines": { | ||
1510 | + "node": ">=4.0.0" | ||
1511 | + } | ||
1512 | + }, | ||
1513 | + "node_modules/mquery": { | ||
1514 | + "version": "4.0.3", | ||
1515 | + "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", | ||
1516 | + "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", | ||
1517 | + "dependencies": { | ||
1518 | + "debug": "4.x" | ||
1519 | + }, | ||
1520 | + "engines": { | ||
1521 | + "node": ">=12.0.0" | ||
1522 | + } | ||
1523 | + }, | ||
1524 | + "node_modules/mquery/node_modules/debug": { | ||
1525 | + "version": "4.3.4", | ||
1526 | + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", | ||
1527 | + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", | ||
1528 | + "dependencies": { | ||
1529 | + "ms": "2.1.2" | ||
1530 | + }, | ||
1531 | + "engines": { | ||
1532 | + "node": ">=6.0" | ||
1533 | + }, | ||
1534 | + "peerDependenciesMeta": { | ||
1535 | + "supports-color": { | ||
1536 | + "optional": true | ||
1537 | + } | ||
1538 | + } | ||
1539 | + }, | ||
1540 | + "node_modules/mquery/node_modules/ms": { | ||
1541 | + "version": "2.1.2", | ||
1542 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | ||
1543 | + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" | ||
1544 | + }, | ||
1445 | "node_modules/ms": { | 1545 | "node_modules/ms": { |
1446 | "version": "2.0.0", | 1546 | "version": "2.0.0", |
1447 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", | 1547 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", |
... | @@ -1671,6 +1771,14 @@ | ... | @@ -1671,6 +1771,14 @@ |
1671 | "once": "^1.3.1" | 1771 | "once": "^1.3.1" |
1672 | } | 1772 | } |
1673 | }, | 1773 | }, |
1774 | + "node_modules/punycode": { | ||
1775 | + "version": "2.1.1", | ||
1776 | + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", | ||
1777 | + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", | ||
1778 | + "engines": { | ||
1779 | + "node": ">=6" | ||
1780 | + } | ||
1781 | + }, | ||
1674 | "node_modules/pupa": { | 1782 | "node_modules/pupa": { |
1675 | "version": "2.1.1", | 1783 | "version": "2.1.1", |
1676 | "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", | 1784 | "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", |
... | @@ -1910,13 +2018,16 @@ | ... | @@ -1910,13 +2018,16 @@ |
1910 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", | 2018 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", |
1911 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" | 2019 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" |
1912 | }, | 2020 | }, |
1913 | - "node_modules/scheduler": { | 2021 | + "node_modules/saslprep": { |
1914 | - "version": "0.22.0", | 2022 | + "version": "1.0.3", |
1915 | - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.22.0.tgz", | 2023 | + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", |
1916 | - "integrity": "sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ==", | 2024 | + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", |
1917 | - "peer": true, | 2025 | + "optional": true, |
1918 | "dependencies": { | 2026 | "dependencies": { |
1919 | - "loose-envify": "^1.1.0" | 2027 | + "sparse-bitfield": "^3.0.3" |
2028 | + }, | ||
2029 | + "engines": { | ||
2030 | + "node": ">=6" | ||
1920 | } | 2031 | } |
1921 | }, | 2032 | }, |
1922 | "node_modules/semver": { | 2033 | "node_modules/semver": { |
... | @@ -2011,11 +2122,47 @@ | ... | @@ -2011,11 +2122,47 @@ |
2011 | "url": "https://github.com/sponsors/ljharb" | 2122 | "url": "https://github.com/sponsors/ljharb" |
2012 | } | 2123 | } |
2013 | }, | 2124 | }, |
2125 | + "node_modules/sift": { | ||
2126 | + "version": "16.0.0", | ||
2127 | + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", | ||
2128 | + "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==" | ||
2129 | + }, | ||
2014 | "node_modules/signal-exit": { | 2130 | "node_modules/signal-exit": { |
2015 | "version": "3.0.7", | 2131 | "version": "3.0.7", |
2016 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", | 2132 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", |
2017 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" | 2133 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" |
2018 | }, | 2134 | }, |
2135 | + "node_modules/smart-buffer": { | ||
2136 | + "version": "4.2.0", | ||
2137 | + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", | ||
2138 | + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", | ||
2139 | + "engines": { | ||
2140 | + "node": ">= 6.0.0", | ||
2141 | + "npm": ">= 3.0.0" | ||
2142 | + } | ||
2143 | + }, | ||
2144 | + "node_modules/socks": { | ||
2145 | + "version": "2.6.2", | ||
2146 | + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", | ||
2147 | + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", | ||
2148 | + "dependencies": { | ||
2149 | + "ip": "^1.1.5", | ||
2150 | + "smart-buffer": "^4.2.0" | ||
2151 | + }, | ||
2152 | + "engines": { | ||
2153 | + "node": ">= 10.13.0", | ||
2154 | + "npm": ">= 3.0.0" | ||
2155 | + } | ||
2156 | + }, | ||
2157 | + "node_modules/sparse-bitfield": { | ||
2158 | + "version": "3.0.3", | ||
2159 | + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", | ||
2160 | + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", | ||
2161 | + "optional": true, | ||
2162 | + "dependencies": { | ||
2163 | + "memory-pager": "^1.0.2" | ||
2164 | + } | ||
2165 | + }, | ||
2019 | "node_modules/spawn-command": { | 2166 | "node_modules/spawn-command": { |
2020 | "version": "0.0.2-1", | 2167 | "version": "0.0.2-1", |
2021 | "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", | 2168 | "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", |
... | @@ -2110,6 +2257,17 @@ | ... | @@ -2110,6 +2257,17 @@ |
2110 | "nodetouch": "bin/nodetouch.js" | 2257 | "nodetouch": "bin/nodetouch.js" |
2111 | } | 2258 | } |
2112 | }, | 2259 | }, |
2260 | + "node_modules/tr46": { | ||
2261 | + "version": "3.0.0", | ||
2262 | + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", | ||
2263 | + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", | ||
2264 | + "dependencies": { | ||
2265 | + "punycode": "^2.1.1" | ||
2266 | + }, | ||
2267 | + "engines": { | ||
2268 | + "node": ">=12" | ||
2269 | + } | ||
2270 | + }, | ||
2113 | "node_modules/tree-kill": { | 2271 | "node_modules/tree-kill": { |
2114 | "version": "1.2.2", | 2272 | "version": "1.2.2", |
2115 | "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", | 2273 | "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", |
... | @@ -2260,12 +2418,24 @@ | ... | @@ -2260,12 +2418,24 @@ |
2260 | "node": ">= 0.8" | 2418 | "node": ">= 0.8" |
2261 | } | 2419 | } |
2262 | }, | 2420 | }, |
2263 | - "node_modules/warning": { | 2421 | + "node_modules/webidl-conversions": { |
2264 | - "version": "4.0.3", | 2422 | + "version": "7.0.0", |
2265 | - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", | 2423 | + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", |
2266 | - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", | 2424 | + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", |
2425 | + "engines": { | ||
2426 | + "node": ">=12" | ||
2427 | + } | ||
2428 | + }, | ||
2429 | + "node_modules/whatwg-url": { | ||
2430 | + "version": "11.0.0", | ||
2431 | + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", | ||
2432 | + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", | ||
2267 | "dependencies": { | 2433 | "dependencies": { |
2268 | - "loose-envify": "^1.0.0" | 2434 | + "tr46": "^3.0.0", |
2435 | + "webidl-conversions": "^7.0.0" | ||
2436 | + }, | ||
2437 | + "engines": { | ||
2438 | + "node": ">=12" | ||
2269 | } | 2439 | } |
2270 | }, | 2440 | }, |
2271 | "node_modules/widest-line": { | 2441 | "node_modules/widest-line": { |
... | @@ -2319,6 +2489,14 @@ | ... | @@ -2319,6 +2489,14 @@ |
2319 | "node": ">=8" | 2489 | "node": ">=8" |
2320 | } | 2490 | } |
2321 | }, | 2491 | }, |
2492 | + "node_modules/xhr2": { | ||
2493 | + "version": "0.2.1", | ||
2494 | + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.1.tgz", | ||
2495 | + "integrity": "sha512-sID0rrVCqkVNUn8t6xuv9+6FViXjUVXq8H5rWOH2rz9fDNQEd4g0EA2XlcEdJXRz5BMEn4O1pJFdT+z4YHhoWw==", | ||
2496 | + "engines": { | ||
2497 | + "node": ">= 6" | ||
2498 | + } | ||
2499 | + }, | ||
2322 | "node_modules/y18n": { | 2500 | "node_modules/y18n": { |
2323 | "version": "5.0.8", | 2501 | "version": "5.0.8", |
2324 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", | 2502 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", |
... | @@ -2432,39 +2610,20 @@ | ... | @@ -2432,39 +2610,20 @@ |
2432 | "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", | 2610 | "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", |
2433 | "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==" | 2611 | "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==" |
2434 | }, | 2612 | }, |
2435 | - "@types/prop-types": { | 2613 | + "@types/webidl-conversions": { |
2436 | - "version": "15.7.5", | 2614 | + "version": "6.1.1", |
2437 | - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", | 2615 | + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", |
2438 | - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" | 2616 | + "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" |
2439 | }, | 2617 | }, |
2440 | - "@types/react": { | 2618 | + "@types/whatwg-url": { |
2441 | - "version": "18.0.9", | 2619 | + "version": "8.2.1", |
2442 | - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz", | 2620 | + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz", |
2443 | - "integrity": "sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw==", | 2621 | + "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==", |
2444 | "requires": { | 2622 | "requires": { |
2445 | - "@types/prop-types": "*", | 2623 | + "@types/node": "*", |
2446 | - "@types/scheduler": "*", | 2624 | + "@types/webidl-conversions": "*" |
2447 | - "csstype": "^3.0.2" | ||
2448 | } | 2625 | } |
2449 | }, | 2626 | }, |
2450 | - "@types/react-transition-group": { | ||
2451 | - "version": "4.4.4", | ||
2452 | - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", | ||
2453 | - "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", | ||
2454 | - "requires": { | ||
2455 | - "@types/react": "*" | ||
2456 | - } | ||
2457 | - }, | ||
2458 | - "@types/scheduler": { | ||
2459 | - "version": "0.16.2", | ||
2460 | - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", | ||
2461 | - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" | ||
2462 | - }, | ||
2463 | - "@types/warning": { | ||
2464 | - "version": "3.0.0", | ||
2465 | - "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz", | ||
2466 | - "integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA==" | ||
2467 | - }, | ||
2468 | "abbrev": { | 2627 | "abbrev": { |
2469 | "version": "1.1.1", | 2628 | "version": "1.1.1", |
2470 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", | 2629 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", |
... | @@ -2533,6 +2692,11 @@ | ... | @@ -2533,6 +2692,11 @@ |
2533 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", | 2692 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", |
2534 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" | 2693 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" |
2535 | }, | 2694 | }, |
2695 | + "base64-js": { | ||
2696 | + "version": "1.5.1", | ||
2697 | + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", | ||
2698 | + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" | ||
2699 | + }, | ||
2536 | "binary-extensions": { | 2700 | "binary-extensions": { |
2537 | "version": "2.2.0", | 2701 | "version": "2.2.0", |
2538 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", | 2702 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", |
... | @@ -2595,6 +2759,23 @@ | ... | @@ -2595,6 +2759,23 @@ |
2595 | "fill-range": "^7.0.1" | 2759 | "fill-range": "^7.0.1" |
2596 | } | 2760 | } |
2597 | }, | 2761 | }, |
2762 | + "bson": { | ||
2763 | + "version": "4.6.4", | ||
2764 | + "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.4.tgz", | ||
2765 | + "integrity": "sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ==", | ||
2766 | + "requires": { | ||
2767 | + "buffer": "^5.6.0" | ||
2768 | + } | ||
2769 | + }, | ||
2770 | + "buffer": { | ||
2771 | + "version": "5.7.1", | ||
2772 | + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", | ||
2773 | + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", | ||
2774 | + "requires": { | ||
2775 | + "base64-js": "^1.3.1", | ||
2776 | + "ieee754": "^1.1.13" | ||
2777 | + } | ||
2778 | + }, | ||
2598 | "bytes": { | 2779 | "bytes": { |
2599 | "version": "3.1.2", | 2780 | "version": "3.1.2", |
2600 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", | 2781 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", |
... | @@ -2854,6 +3035,11 @@ | ... | @@ -2854,6 +3035,11 @@ |
2854 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", | 3035 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", |
2855 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" | 3036 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" |
2856 | }, | 3037 | }, |
3038 | + "denque": { | ||
3039 | + "version": "2.0.1", | ||
3040 | + "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", | ||
3041 | + "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==" | ||
3042 | + }, | ||
2857 | "depd": { | 3043 | "depd": { |
2858 | "version": "2.0.0", | 3044 | "version": "2.0.0", |
2859 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", | 3045 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", |
... | @@ -3167,6 +3353,11 @@ | ... | @@ -3167,6 +3353,11 @@ |
3167 | "safer-buffer": ">= 2.1.2 < 3" | 3353 | "safer-buffer": ">= 2.1.2 < 3" |
3168 | } | 3354 | } |
3169 | }, | 3355 | }, |
3356 | + "ieee754": { | ||
3357 | + "version": "1.2.1", | ||
3358 | + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", | ||
3359 | + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" | ||
3360 | + }, | ||
3170 | "ignore-by-default": { | 3361 | "ignore-by-default": { |
3171 | "version": "1.0.1", | 3362 | "version": "1.0.1", |
3172 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", | 3363 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", |
... | @@ -3192,13 +3383,10 @@ | ... | @@ -3192,13 +3383,10 @@ |
3192 | "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", | 3383 | "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", |
3193 | "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" | 3384 | "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" |
3194 | }, | 3385 | }, |
3195 | - "invariant": { | 3386 | + "ip": { |
3196 | - "version": "2.2.4", | 3387 | + "version": "1.1.8", |
3197 | - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", | 3388 | + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", |
3198 | - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", | 3389 | + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==" |
3199 | - "requires": { | ||
3200 | - "loose-envify": "^1.0.0" | ||
3201 | - } | ||
3202 | }, | 3390 | }, |
3203 | "ipaddr.js": { | 3391 | "ipaddr.js": { |
3204 | "version": "1.9.1", | 3392 | "version": "1.9.1", |
... | @@ -3293,6 +3481,11 @@ | ... | @@ -3293,6 +3481,11 @@ |
3293 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", | 3481 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", |
3294 | "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==" | 3482 | "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==" |
3295 | }, | 3483 | }, |
3484 | + "kareem": { | ||
3485 | + "version": "2.3.5", | ||
3486 | + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz", | ||
3487 | + "integrity": "sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg==" | ||
3488 | + }, | ||
3296 | "keyv": { | 3489 | "keyv": { |
3297 | "version": "3.1.0", | 3490 | "version": "3.1.0", |
3298 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", | 3491 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", |
... | @@ -3355,6 +3548,12 @@ | ... | @@ -3355,6 +3548,12 @@ |
3355 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", | 3548 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", |
3356 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" | 3549 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" |
3357 | }, | 3550 | }, |
3551 | + "memory-pager": { | ||
3552 | + "version": "1.5.0", | ||
3553 | + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", | ||
3554 | + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", | ||
3555 | + "optional": true | ||
3556 | + }, | ||
3358 | "merge-descriptors": { | 3557 | "merge-descriptors": { |
3359 | "version": "1.0.1", | 3558 | "version": "1.0.1", |
3360 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", | 3559 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", |
... | @@ -3410,6 +3609,76 @@ | ... | @@ -3410,6 +3609,76 @@ |
3410 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", | 3609 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", |
3411 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" | 3610 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" |
3412 | }, | 3611 | }, |
3612 | + "mongodb": { | ||
3613 | + "version": "4.5.0", | ||
3614 | + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz", | ||
3615 | + "integrity": "sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA==", | ||
3616 | + "requires": { | ||
3617 | + "bson": "^4.6.2", | ||
3618 | + "denque": "^2.0.1", | ||
3619 | + "mongodb-connection-string-url": "^2.5.2", | ||
3620 | + "saslprep": "^1.0.3", | ||
3621 | + "socks": "^2.6.2" | ||
3622 | + } | ||
3623 | + }, | ||
3624 | + "mongodb-connection-string-url": { | ||
3625 | + "version": "2.5.2", | ||
3626 | + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz", | ||
3627 | + "integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==", | ||
3628 | + "requires": { | ||
3629 | + "@types/whatwg-url": "^8.2.1", | ||
3630 | + "whatwg-url": "^11.0.0" | ||
3631 | + } | ||
3632 | + }, | ||
3633 | + "mongoose": { | ||
3634 | + "version": "6.3.4", | ||
3635 | + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz", | ||
3636 | + "integrity": "sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw==", | ||
3637 | + "requires": { | ||
3638 | + "bson": "^4.6.2", | ||
3639 | + "kareem": "2.3.5", | ||
3640 | + "mongodb": "4.5.0", | ||
3641 | + "mpath": "0.9.0", | ||
3642 | + "mquery": "4.0.3", | ||
3643 | + "ms": "2.1.3", | ||
3644 | + "sift": "16.0.0" | ||
3645 | + }, | ||
3646 | + "dependencies": { | ||
3647 | + "ms": { | ||
3648 | + "version": "2.1.3", | ||
3649 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", | ||
3650 | + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" | ||
3651 | + } | ||
3652 | + } | ||
3653 | + }, | ||
3654 | + "mpath": { | ||
3655 | + "version": "0.9.0", | ||
3656 | + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", | ||
3657 | + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==" | ||
3658 | + }, | ||
3659 | + "mquery": { | ||
3660 | + "version": "4.0.3", | ||
3661 | + "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", | ||
3662 | + "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", | ||
3663 | + "requires": { | ||
3664 | + "debug": "4.x" | ||
3665 | + }, | ||
3666 | + "dependencies": { | ||
3667 | + "debug": { | ||
3668 | + "version": "4.3.4", | ||
3669 | + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", | ||
3670 | + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", | ||
3671 | + "requires": { | ||
3672 | + "ms": "2.1.2" | ||
3673 | + } | ||
3674 | + }, | ||
3675 | + "ms": { | ||
3676 | + "version": "2.1.2", | ||
3677 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | ||
3678 | + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" | ||
3679 | + } | ||
3680 | + } | ||
3681 | + }, | ||
3413 | "ms": { | 3682 | "ms": { |
3414 | "version": "2.0.0", | 3683 | "version": "2.0.0", |
3415 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", | 3684 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", |
... | @@ -3581,6 +3850,11 @@ | ... | @@ -3581,6 +3850,11 @@ |
3581 | "once": "^1.3.1" | 3850 | "once": "^1.3.1" |
3582 | } | 3851 | } |
3583 | }, | 3852 | }, |
3853 | + "punycode": { | ||
3854 | + "version": "2.1.1", | ||
3855 | + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", | ||
3856 | + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" | ||
3857 | + }, | ||
3584 | "pupa": { | 3858 | "pupa": { |
3585 | "version": "2.1.1", | 3859 | "version": "2.1.1", |
3586 | "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", | 3860 | "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", |
... | @@ -3755,13 +4029,13 @@ | ... | @@ -3755,13 +4029,13 @@ |
3755 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", | 4029 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", |
3756 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" | 4030 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" |
3757 | }, | 4031 | }, |
3758 | - "scheduler": { | 4032 | + "saslprep": { |
3759 | - "version": "0.22.0", | 4033 | + "version": "1.0.3", |
3760 | - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.22.0.tgz", | 4034 | + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", |
3761 | - "integrity": "sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ==", | 4035 | + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", |
3762 | - "peer": true, | 4036 | + "optional": true, |
3763 | "requires": { | 4037 | "requires": { |
3764 | - "loose-envify": "^1.1.0" | 4038 | + "sparse-bitfield": "^3.0.3" |
3765 | } | 4039 | } |
3766 | }, | 4040 | }, |
3767 | "semver": { | 4041 | "semver": { |
... | @@ -3842,11 +4116,39 @@ | ... | @@ -3842,11 +4116,39 @@ |
3842 | "object-inspect": "^1.9.0" | 4116 | "object-inspect": "^1.9.0" |
3843 | } | 4117 | } |
3844 | }, | 4118 | }, |
4119 | + "sift": { | ||
4120 | + "version": "16.0.0", | ||
4121 | + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", | ||
4122 | + "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==" | ||
4123 | + }, | ||
3845 | "signal-exit": { | 4124 | "signal-exit": { |
3846 | "version": "3.0.7", | 4125 | "version": "3.0.7", |
3847 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", | 4126 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", |
3848 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" | 4127 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" |
3849 | }, | 4128 | }, |
4129 | + "smart-buffer": { | ||
4130 | + "version": "4.2.0", | ||
4131 | + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", | ||
4132 | + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" | ||
4133 | + }, | ||
4134 | + "socks": { | ||
4135 | + "version": "2.6.2", | ||
4136 | + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", | ||
4137 | + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", | ||
4138 | + "requires": { | ||
4139 | + "ip": "^1.1.5", | ||
4140 | + "smart-buffer": "^4.2.0" | ||
4141 | + } | ||
4142 | + }, | ||
4143 | + "sparse-bitfield": { | ||
4144 | + "version": "3.0.3", | ||
4145 | + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", | ||
4146 | + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", | ||
4147 | + "optional": true, | ||
4148 | + "requires": { | ||
4149 | + "memory-pager": "^1.0.2" | ||
4150 | + } | ||
4151 | + }, | ||
3850 | "spawn-command": { | 4152 | "spawn-command": { |
3851 | "version": "0.0.2-1", | 4153 | "version": "0.0.2-1", |
3852 | "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", | 4154 | "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", |
... | @@ -3914,6 +4216,14 @@ | ... | @@ -3914,6 +4216,14 @@ |
3914 | "nopt": "~1.0.10" | 4216 | "nopt": "~1.0.10" |
3915 | } | 4217 | } |
3916 | }, | 4218 | }, |
4219 | + "tr46": { | ||
4220 | + "version": "3.0.0", | ||
4221 | + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", | ||
4222 | + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", | ||
4223 | + "requires": { | ||
4224 | + "punycode": "^2.1.1" | ||
4225 | + } | ||
4226 | + }, | ||
3917 | "tree-kill": { | 4227 | "tree-kill": { |
3918 | "version": "1.2.2", | 4228 | "version": "1.2.2", |
3919 | "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", | 4229 | "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", |
... | @@ -4024,12 +4334,18 @@ | ... | @@ -4024,12 +4334,18 @@ |
4024 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", | 4334 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", |
4025 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" | 4335 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" |
4026 | }, | 4336 | }, |
4027 | - "warning": { | 4337 | + "webidl-conversions": { |
4028 | - "version": "4.0.3", | 4338 | + "version": "7.0.0", |
4029 | - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", | 4339 | + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", |
4030 | - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", | 4340 | + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" |
4341 | + }, | ||
4342 | + "whatwg-url": { | ||
4343 | + "version": "11.0.0", | ||
4344 | + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", | ||
4345 | + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", | ||
4031 | "requires": { | 4346 | "requires": { |
4032 | - "loose-envify": "^1.0.0" | 4347 | + "tr46": "^3.0.0", |
4348 | + "webidl-conversions": "^7.0.0" | ||
4033 | } | 4349 | } |
4034 | }, | 4350 | }, |
4035 | "widest-line": { | 4351 | "widest-line": { |
... | @@ -4071,6 +4387,11 @@ | ... | @@ -4071,6 +4387,11 @@ |
4071 | "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", | 4387 | "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", |
4072 | "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" | 4388 | "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" |
4073 | }, | 4389 | }, |
4390 | + "xhr2": { | ||
4391 | + "version": "0.2.1", | ||
4392 | + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.1.tgz", | ||
4393 | + "integrity": "sha512-sID0rrVCqkVNUn8t6xuv9+6FViXjUVXq8H5rWOH2rz9fDNQEd4g0EA2XlcEdJXRz5BMEn4O1pJFdT+z4YHhoWw==" | ||
4394 | + }, | ||
4074 | "y18n": { | 4395 | "y18n": { |
4075 | "version": "5.0.8", | 4396 | "version": "5.0.8", |
4076 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", | 4397 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", | ... | ... |
1 | { | 1 | { |
2 | "scripts": { | 2 | "scripts": { |
3 | "server": "cd server && nodemon server", | 3 | "server": "cd server && nodemon server", |
4 | - "client": "cd client && npm start", | 4 | + "client": "cd client && export PORT=8080 && set PORT=8080 && npm start --port", |
5 | "start": "concurrently --kill-others-on-fail \"npm run server\" \"npm run client\"" | 5 | "start": "concurrently --kill-others-on-fail \"npm run server\" \"npm run client\"" |
6 | }, | 6 | }, |
7 | "dependencies": { | 7 | "dependencies": { |
8 | "axios": "^0.27.2", | 8 | "axios": "^0.27.2", |
9 | - "bootstrap": "^5.1.3", | 9 | + "body-parser": "^1.20.0", |
10 | "concurrently": "^7.2.1", | 10 | "concurrently": "^7.2.1", |
11 | "express": "^4.18.1", | 11 | "express": "^4.18.1", |
12 | "http-proxy-middleware": "^2.0.6", | 12 | "http-proxy-middleware": "^2.0.6", |
13 | + "mongoose": "^6.3.4", | ||
13 | "nodemon": "^2.0.16", | 14 | "nodemon": "^2.0.16", |
14 | - "react-bootstrap": "^2.4.0" | 15 | + "xhr2": "^0.2.1" |
15 | } | 16 | } |
16 | } | 17 | } | ... | ... |
server/Router/api.js
0 → 100644
1 | +const express = require('express'); | ||
2 | +const router = express.Router(); | ||
3 | +const mongoose = require('mongoose'); | ||
4 | +const XMLHttpRequest = require('xhr2'); | ||
5 | + | ||
6 | +mongoose.connect('mongodb+srv://choieunseok:uA3mhjPcB3DwsuuD@cluster0.2gsua4u.mongodb.net/?retryWrites=true&w=majority'); | ||
7 | + | ||
8 | +const db = mongoose.connection | ||
9 | +db.on('error', console.error) | ||
10 | +db.once('open', () => { | ||
11 | + console.log('Connected to mongodb Server') | ||
12 | +}); | ||
13 | + | ||
14 | +const dayPostList = mongoose.Schema({ | ||
15 | + date: 'string', | ||
16 | + idArray: [{ type: String }] | ||
17 | +}); | ||
18 | +const dayPostListModel = mongoose.model('dayPostList', dayPostList); | ||
19 | +const post = mongoose.Schema({ | ||
20 | + date: 'string', | ||
21 | + title: 'string', | ||
22 | + content: 'string', | ||
23 | + password: 'string' | ||
24 | +}); | ||
25 | +const postModel = mongoose.model('post', post); | ||
26 | + | ||
27 | +const waiting = mongoose.Schema({ | ||
28 | + date: 'string', | ||
29 | + waiting: [] | ||
30 | +}); | ||
31 | +const waitingModel = mongoose.model('waiting', waiting); | ||
32 | + | ||
33 | +// router.get('/api', (req, res) => { | ||
34 | +// res.send({ test: "hi" }); | ||
35 | +// }); | ||
36 | + | ||
37 | +function getCurrentDate(originDate) { | ||
38 | + var date; | ||
39 | + if (originDate == null) date = new Date(); | ||
40 | + else date = new Date(originDate); | ||
41 | + var year = date.getFullYear().toString(); | ||
42 | + | ||
43 | + var month = date.getMonth() + 1; | ||
44 | + month = month < 10 ? '0' + month.toString() : month.toString(); | ||
45 | + | ||
46 | + var day = date.getDate(); | ||
47 | + day = day < 10 ? '0' + day.toString() : day.toString(); | ||
48 | + | ||
49 | + return year + '-' + month + '-' + day; | ||
50 | +} | ||
51 | + | ||
52 | +function arrayEquals(a, b) { | ||
53 | + return Array.isArray(a) && | ||
54 | + Array.isArray(b) && | ||
55 | + a.length === b.length && | ||
56 | + a.every((val, index) => val === b[index]); | ||
57 | +} | ||
58 | + | ||
59 | +router.get('/api/getList', async (req, res) => { // 오늘 게시물들의 아이디 표시 | ||
60 | + try { | ||
61 | + const today = getCurrentDate(); | ||
62 | + var testDayPostList = await dayPostListModel.findOne({ date: today }); | ||
63 | + if (testDayPostList == null) testDayPostList = new dayPostListModel({ date: today, idArray: [] }); | ||
64 | + res.send(testDayPostList.idArray); | ||
65 | + } | ||
66 | + catch (err) { | ||
67 | + res.send(err.message); | ||
68 | + } | ||
69 | +}); | ||
70 | + | ||
71 | +router.get('/api/getList/:date', async (req, res) => { // 특정 날자의 게시물들의 아이디 표시 | ||
72 | + try { | ||
73 | + const today = getCurrentDate(req.params.date); | ||
74 | + var testDayPostList = await dayPostListModel.findOne({ date: today }); | ||
75 | + if (testDayPostList == null) testDayPostList = new dayPostListModel({ date: today, idArray: [] }); | ||
76 | + res.send(testDayPostList.idArray); | ||
77 | + } | ||
78 | + catch (err) { | ||
79 | + res.send(err.message); | ||
80 | + } | ||
81 | +}); | ||
82 | + | ||
83 | +router.get('/api/get', async (req, res) => { // 특정 id(여러개)의 게시물 내용 요약 불러오기 | ||
84 | + try { | ||
85 | + const idArray = req.body.idArray; | ||
86 | + var resultArray = []; | ||
87 | + for (const id of idArray) { | ||
88 | + const onePost = await postModel.findById(id); | ||
89 | + var tempJSON = {}; | ||
90 | + tempJSON.id = onePost.id; | ||
91 | + tempJSON.title = onePost.title; | ||
92 | + tempJSON.content = onePost.content; | ||
93 | + tempJSON.content = tempJSON.content.replace(/(?:\r\n|\r|\n)/g, ''); | ||
94 | + const sliceLength = 10; | ||
95 | + if (tempJSON.content.length > sliceLength) tempJSON.content = tempJSON.content.slice(0, sliceLength) + "..."; | ||
96 | + resultArray.push(tempJSON); | ||
97 | + } | ||
98 | + res.send(resultArray); | ||
99 | + } | ||
100 | + catch (err) { | ||
101 | + res.send(err.message); | ||
102 | + } | ||
103 | +}); | ||
104 | + | ||
105 | +router.get('/api/get/:id', async (req, res) => { // 특정 id의 게시물 불러오기 | ||
106 | + try { | ||
107 | + const currentPost = await postModel.findById(req.params.id); | ||
108 | + res.send({ title: currentPost.title, content: currentPost.content }); | ||
109 | + } | ||
110 | + catch (err) { | ||
111 | + res.send(err.message); | ||
112 | + } | ||
113 | +}); | ||
114 | + | ||
115 | +router.post('/api/isPassEqual', async (req, res) => { // 암호가 같으면 success, 아니면 failed | ||
116 | + try { | ||
117 | + const currentPost = await postModel.findById(req.body.id); | ||
118 | + if (currentPost.password == req.body.password) res.send("success"); | ||
119 | + else res.send("failed"); | ||
120 | + } | ||
121 | + catch (err) { | ||
122 | + res.send("failed"); | ||
123 | + } | ||
124 | +}); | ||
125 | + | ||
126 | +router.post('/api/postSave', async (req, res) => { // 오늘 게시물 작성 | ||
127 | + try { | ||
128 | + var isFirst = false; | ||
129 | + const today = getCurrentDate(); | ||
130 | + | ||
131 | + var testDayPostList = await dayPostListModel.findOne({ date: today }); | ||
132 | + if (testDayPostList == null) { | ||
133 | + testDayPostList = new dayPostListModel({ date: today, idArray: [] }); | ||
134 | + isFirst = true; | ||
135 | + } | ||
136 | + var postListArr = testDayPostList.idArray; | ||
137 | + var newPost = new postModel({ date: today, title: req.body.title, content: req.body.content, password: req.body.password }); | ||
138 | + var newPostData = await newPost.save(); | ||
139 | + postListArr.push(newPostData._id.toString()); | ||
140 | + | ||
141 | + if (isFirst) await testDayPostList.save(); | ||
142 | + else await dayPostListModel.updateOne({ date: today }, { idArray: postListArr }); | ||
143 | + | ||
144 | + res.send("success"); | ||
145 | + } | ||
146 | + catch (err) { | ||
147 | + res.send(err.message); | ||
148 | + } | ||
149 | +}); | ||
150 | + | ||
151 | +router.put('/api/edit/:id', async (req, res) => { // 게시물 수정 | ||
152 | + try { | ||
153 | + const id = req.params.id; | ||
154 | + const title = req.body.title; | ||
155 | + const content = req.body.content; | ||
156 | + await postModel.findByIdAndUpdate(id, { title: title, content: content }); | ||
157 | + res.send("success"); | ||
158 | + } | ||
159 | + catch (err) { | ||
160 | + res.send(err.message); | ||
161 | + } | ||
162 | +}); | ||
163 | + | ||
164 | +router.delete('/api/delete/:id', async (req, res) => { // 게시물 삭제 | ||
165 | + try { | ||
166 | + const id = req.params.id; | ||
167 | + const list = await dayPostListModel.find(); | ||
168 | + for (const dayList of list) { | ||
169 | + var newArray = dayList.idArray.filter((data)=>{return data != id;}) | ||
170 | + if(!arrayEquals(dayList.idArray, newArray)){ | ||
171 | + await dayPostListModel.findByIdAndUpdate(dayList._id.toString(), {idArray: newArray}); | ||
172 | + } | ||
173 | + } | ||
174 | + await postModel.findByIdAndDelete(id); | ||
175 | + res.send("success"); | ||
176 | + } | ||
177 | + catch (err) { | ||
178 | + res.send(err.message); | ||
179 | + } | ||
180 | +}); | ||
181 | + | ||
182 | + | ||
183 | +router.get('/api/waiting', async (req, res) => { // 오늘의 대기시간 목록 가져오기 | ||
184 | + try { | ||
185 | + const today = getCurrentDate(); | ||
186 | + var waitingList = await waitingModel.findOne({ date: today }); | ||
187 | + if (waitingList == null) waitingList = [] | ||
188 | + else waitingList = waitingList. waiting; | ||
189 | + res.send(waitingList); | ||
190 | + } | ||
191 | + catch (err) { | ||
192 | + res.send(err.message); | ||
193 | + } | ||
194 | +}); | ||
195 | + | ||
196 | +router.post('/api/waiting', async (req, res) => { // 오늘의 대기시간 목록 추가 | ||
197 | + try { | ||
198 | + const today = getCurrentDate(); | ||
199 | + var waitingList = await waitingModel.findOne({ date: today }); | ||
200 | + | ||
201 | + const date = new Date(); | ||
202 | + const time = date.getHours() + ":" + date.getMinutes(); | ||
203 | + const newWaiting = {value: req.body.value, time: time}; | ||
204 | + | ||
205 | + if (waitingList == null) await waitingModel({date: today, waiting: [newWaiting]}).save(); | ||
206 | + else{ | ||
207 | + waitingList.waiting.push(newWaiting); | ||
208 | + await waitingModel.findOneAndUpdate({ date: today }, {waiting: waitingList.waiting}); | ||
209 | + } | ||
210 | + | ||
211 | + var waitingListResult = await waitingModel.findOne({ date: today }); | ||
212 | + res.send(waitingListResult); | ||
213 | + } | ||
214 | + catch (err) { | ||
215 | + res.send(err.message); | ||
216 | + } | ||
217 | +}); | ||
218 | + | ||
219 | + | ||
220 | +function setting(resultJson){ | ||
221 | + var result = {} | ||
222 | + result.fo_date = [resultJson.fo_date1, resultJson.fo_date2, resultJson.fo_date3, resultJson.fo_date4, resultJson.fo_date5]; | ||
223 | + result.fo_menu_lun = [resultJson.fo_menu_lun1, resultJson.fo_menu_lun2, resultJson.fo_menu_lun3, resultJson.fo_menu_lun4, resultJson.fo_menu_lun5]; | ||
224 | + result.fo_menu_eve = [resultJson.fo_menu_eve1, resultJson.fo_menu_eve2, resultJson.fo_menu_eve3, resultJson.fo_menu_eve4, resultJson.fo_menu_eve5]; | ||
225 | + return result; | ||
226 | +} | ||
227 | + | ||
228 | +router.get('/api/menuList', async (req, res) => { // 제2기숙사 학식 메뉴 일주일치 불러오기 | ||
229 | + try { | ||
230 | + | ||
231 | + let newRequest = new XMLHttpRequest(); | ||
232 | + newRequest.onreadystatechange = () => { | ||
233 | + if (newRequest.status == 200 && newRequest.readyState == 4) { | ||
234 | + var dt = new Date(); | ||
235 | + if (dt.getDay() == 0 || dt.getDay() == 6) { | ||
236 | + resJSON0 = JSON.parse(newRequest.responseText).root[0].LASTNEXT[0] | ||
237 | + resJSON1 = JSON.parse(newRequest.responseText).root[0].LASTNEXT[1] | ||
238 | + if (resJSON0.go === "next_mon") { | ||
239 | + let nextRequest = new XMLHttpRequest(); | ||
240 | + nextRequest.onreadystatechange = () => { | ||
241 | + if (nextRequest.status == 200 && nextRequest.readyState == 4) { | ||
242 | + newResJSON = JSON.parse(nextRequest.responseText).root[0].WEEKLYMENU[0] | ||
243 | + res.send(setting(newResJSON)); | ||
244 | + } | ||
245 | + } | ||
246 | + nextRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc') | ||
247 | + nextRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded') | ||
248 | + nextRequest.send("locgbn=K1&sch_date=" + resJSON0.mon_date + "&fo_gbn=stu") | ||
249 | + } else if (resJSON1.go === "next_mon") { | ||
250 | + let nextRequest = new XMLHttpRequest(); | ||
251 | + nextRequest.onreadystatechange = () => { | ||
252 | + if (nextRequest.status == 200 && nextRequest.readyState == 4) { | ||
253 | + newResJSON = JSON.parse(nextRequest.responseText).root[0].WEEKLYMENU[0] | ||
254 | + res.send(setting(newResJSON)); | ||
255 | + } | ||
256 | + } | ||
257 | + nextRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc') | ||
258 | + nextRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded') | ||
259 | + nextRequest.send("locgbn=K1&sch_date=" + resJSON1.mon_date + "&fo_gbn=stu") | ||
260 | + } | ||
261 | + } | ||
262 | + else { | ||
263 | + resJSON = JSON.parse(newRequest.responseText).root[0].WEEKLYMENU[0] | ||
264 | + res.send(setting(resJSON)); | ||
265 | + } | ||
266 | + } | ||
267 | + } | ||
268 | + newRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc') | ||
269 | + newRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded') | ||
270 | + newRequest.send("locgbn=K1&sch_date=&fo_gbn=stu") | ||
271 | + } | ||
272 | + catch (err) { | ||
273 | + res.send(err.message); | ||
274 | + } | ||
275 | +}); | ||
276 | + | ||
277 | +router.get('/api/todayMenu', async (req, res) => { // 제2기숙사 학식 메뉴 하루치 불러오기 | ||
278 | + try { | ||
279 | + let newRequest = new XMLHttpRequest(); | ||
280 | + newRequest.onreadystatechange = () => { | ||
281 | + if (newRequest.status == 200 && newRequest.readyState == 4) { | ||
282 | + var dt = new Date(); | ||
283 | + if(dt.getDay() > 0 && dt.getDay() < 6){ | ||
284 | + resJSON = JSON.parse(newRequest.responseText).root[0].WEEKLYMENU[0]; | ||
285 | + const weekMenu = setting(resJSON); | ||
286 | + const todayMenu = [weekMenu.fo_menu_lun[dt.getDay()-1], weekMenu.fo_menu_eve[dt.getDay()-1]]; | ||
287 | + res.send(todayMenu); | ||
288 | + }else res.send("weekend"); | ||
289 | + | ||
290 | + } | ||
291 | + } | ||
292 | + newRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc') | ||
293 | + newRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded') | ||
294 | + newRequest.send("locgbn=K1&sch_date=&fo_gbn=stu") | ||
295 | + } | ||
296 | + catch (err) { | ||
297 | + res.send(err.message); | ||
298 | + } | ||
299 | +}); | ||
300 | + | ||
301 | +// router.get('/api/testSave', async (req, res) => { | ||
302 | +// var isFirst = false; | ||
303 | + | ||
304 | +// var testDayPostList = await dayPostListModel.findOne({ date: '2022-05-30' }); | ||
305 | +// if (testDayPostList == null) { | ||
306 | +// testDayPostList = new dayPostListModel({ date: '2022-05-30', idArray: [] }); | ||
307 | +// isFirst = true; | ||
308 | +// } | ||
309 | +// var postListArr = testDayPostList.idArray; | ||
310 | + | ||
311 | +// var newPost = new postModel({ date: '2022-05-30', title: '테스트 제목', content: '테스트 내용', password: 'password' }); | ||
312 | +// var newPostData = await newPost.save(); | ||
313 | +// postListArr.push(newPostData._id.toString()); | ||
314 | + | ||
315 | +// if (isFirst) await testDayPostList.save(); | ||
316 | +// else await dayPostListModel.updateOne({ date: '2022-05-30' }, { idArray: postListArr }); | ||
317 | + | ||
318 | +// res.send("test"); | ||
319 | +// }); | ||
320 | + | ||
321 | +module.exports = router; | ||
322 | + |
server/Router/test.js
deleted
100644 → 0
1 | const express = require('express'); | 1 | const express = require('express'); |
2 | const app = express(); | 2 | const app = express(); |
3 | -const test = require('.//Router/test'); | 3 | +const api = require('./Router/api'); |
4 | +let bodyParser = require('body-parser'); | ||
5 | +app.use(bodyParser.urlencoded({ extended: false })); | ||
6 | +app.use(bodyParser.json()); | ||
4 | 7 | ||
5 | -app.use('/', test); | 8 | +app.use('/', api); |
6 | 9 | ||
7 | -const port=23023; | ||
8 | -app.listen(port, ()=>{console.log(`Listening on port ${port}`)}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
10 | +const port = 23023; | ||
11 | +app.listen(port, () => { console.log(`Listening on port ${port}`) }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment