최은석

Merge branch 'master' of http://khuhub.khu.ac.kr/2021105655/ossw-project into front

# Conflicts:
#	client/package.json
#	package-lock.json
#	package.json
# How to Install
```
npm install && cd client && npm install && cd ../
```
# How to Start
```
npm start
```
# 학식 관련된 의견 주고 받는 커뮤니티
> 친구의 부탁으로 인해 현재 제2기숙사와 학생회관의 학식을 보여주는 앱을 개발했습니다.
> 이와 관련된 반응을 에브리타임 앱에서 보고 있었습니다.
......@@ -20,4 +30,171 @@
* 카카오톡의 반응 기능이나 인스타의 좋아요 처럼 게시물에 이모티콘을 사용자가 표시하는 기능
```한 사용자가 여러번 남기는 것을 막아야 해서 로그인 기능 고려 필요```
* 게시물 작성을 유도하기 위해 포인트 적립을 통해 랭킹 기능 고려
* 작성된 글을 보기 쉽도록 게시글을 검색하는 기능
\ No newline at end of file
* 작성된 글을 보기 쉽도록 게시글을 검색하는 기능
# BACK
## 게시물
### /api/getList
#### GET호출
> response
> ```
> ["게시물 id1", "게시물 id2", "게시물 id3"]
>```
>> 오늘 게시물들의 아이디 표시
-------------
### /api/getList/:date
#### GET호출
> response
> ```
> ["게시물 id1", "게시물 id2", "게시물 id3"]
>```
>> 특정 날자의 게시물들의 아이디 표시
-------------
### /api/get
#### GET호출
> request(body)
> ```
> {
> "idArray": ["게시물 id1", "게시물 id2", "게시물 id3"]
> }
> ```
> response
> ```
> [
> {
> "id": "게시물 id1",
> "title": "제목1",
> "content": "내용1"
> },
> {
> "id": "게시물 id2",
> "title": "제목2",
> "content": "내용2"
> },
> {
> "id": "게시물 id3",
> "title": "제목3",
> "content": "이 것은 긴 내용이..."
> }
> ]
> ```
>> 특정 id(여러개)의 게시물 내용 요약 불러오기
-------------
### /api/get/:id
#### GET호출
> response
> ```
> {
> "title": "제목",
> "content": "내용"
> }
>```
>> 특정 id의 게시물 불러오기
-------------
### /api/isPassEqual
#### POST호출
> request(body)
> ```
> {
> "id":"게시물 id",
> "password":"사용자가 입력한 암호"
> }
> ```
> response
> ```
> success
> ```
> or
> ```
> failed
> ```
>
>> 암호가 같으면 success, 아니면 failed
-------------
### /api/postSave
#### POST호출
> request(body)
> ```
> {
> "title":"제목",
> "content":"게시물 내용",
> "password":"암호"
> }
> ```
>> 오늘 게시물 작성
## 대기시간
### /api/waiting
#### GET호출
> response
> ```
> [
> {
> "value": "대기시간1",
> "time": "12:34"
> }
> ]
>```
>> 오늘의 대기시간 목록 가져오기
-------------
### /api/waiting
#### POST호출
> request(body)
> ```
> {
> "value":"대기시간2",
> }
> ```
> response
> ```
> [
> {
> "value": "대기시간1",
> "time": "12:34"
> },
> {
> "value": "대기시간2",
> "time": "13:57"
> }
> ]
>```
>> 오늘의 대기시간 추가
## 제2기숙사 학식 메뉴
### /api/menuList
#### GET호출
> response
> ```
> {
> "fo_date": [
> "2022-05-30",
> "2022-05-31",
> "2022-06-01",
> "2022-06-02",
> "2022-06-03"
> ],
> "fo_menu_lun": [
> "도시락: 고추장불고기,근대된장국,도토리묵무침,미역줄기볶음,배추김치",
> "도시락: 치즈함박스테이크,쇠고기스프,양상추샐러드,햄채소볶음밥,오이피클,배추김치",
> "운영없음",
> "도시락: 王소시지&카레라이스,다시마무챗국,만두튀김,단무지무침,배추김치",
> "도시락: 돈까스마요덮밥,매운콩나물국,카레크로켓,마카로니샐러드,볶음김치"
> ],
> "fo_menu_eve": [
> "도시락: 참치김치찌개,꼬마돈가스,돌자반볶음,단무지,쌀밥",
> "도시락: 비빔우동&납작만두,유부장국,완자전,무말랭이무침,배추김치",
> "운영없음",
> "도시락: 치즈데리야끼불고기볶음밥,떡강정,양배추콘샐러드,배추김치,탄산음료",
> "운영없음"
> ]
> }
>```
>> 제2기숙사 학식 메뉴 일주일치 가져오기
......
......@@ -7,6 +7,7 @@
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"bootstrap": "^5.1.3",
"axios": "^0.27.2",
"react": "^18.1.0",
"react-bootstrap": "^2.4.0",
"react-dom": "^18.1.0",
......
......@@ -6,74 +6,13 @@
"": {
"dependencies": {
"axios": "^0.27.2",
"bootstrap": "^5.1.3",
"body-parser": "^1.20.0",
"concurrently": "^7.2.1",
"express": "^4.18.1",
"http-proxy-middleware": "^2.0.6",
"mongoose": "^6.3.4",
"nodemon": "^2.0.16",
"react-bootstrap": "^2.4.0"
}
},
"node_modules/@babel/runtime": {
"version": "7.18.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz",
"integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@popperjs/core": {
"version": "2.11.5",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@restart/hooks": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.7.tgz",
"integrity": "sha512-ZbjlEHcG+FQtpDPHd7i4FzNNvJf2enAwZfJbpM8CW7BhmOAbsHpZe3tsHwfQUrBuyrxWqPYp2x5UMnilWcY22A==",
"dependencies": {
"dequal": "^2.0.2"
},
"peerDependencies": {
"react": ">=16.8.0"
}
},
"node_modules/@restart/ui": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.2.0.tgz",
"integrity": "sha512-oIh2t3tG8drZtZ9SlaV5CY6wGsUViHk8ZajjhcI+74IQHyWy+AnxDv8rJR5wVgsgcgrPBUvGNkC1AEdcGNPaLQ==",
"dependencies": {
"@babel/runtime": "^7.13.16",
"@popperjs/core": "^2.10.1",
"@react-aria/ssr": "^3.0.1",
"@restart/hooks": "^0.4.0",
"@types/warning": "^3.0.0",
"dequal": "^2.0.2",
"dom-helpers": "^5.2.0",
"uncontrollable": "^7.2.1",
"warning": "^4.0.3"
},
"peerDependencies": {
"react": ">=16.14.0",
"react-dom": ">=16.14.0"
}
},
"node_modules/@restart/ui/node_modules/@react-aria/ssr": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.1.2.tgz",
"integrity": "sha512-amXY11ImpokvkTMeKRHjsSsG7v1yzzs6yeqArCyBIk60J3Yhgxwx9Cah+Uu/804ATFwqzN22AXIo7SdtIaMP+g==",
"dependencies": {
"@babel/runtime": "^7.6.2"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1"
"xhr2": "^0.2.1"
}
},
"node_modules/@sindresorhus/is": {
......@@ -108,39 +47,20 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz",
"integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA=="
},
"node_modules/@types/prop-types": {
"version": "15.7.5",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
"integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
"node_modules/@types/webidl-conversions": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
"integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"node_modules/@types/react": {
"version": "18.0.9",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz",
"integrity": "sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw==",
"node_modules/@types/whatwg-url": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
"integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
"dependencies": {
"@types/prop-types": "*",
"@types/scheduler": "*",
"csstype": "^3.0.2"
"@types/node": "*",
"@types/webidl-conversions": "*"
}
},
"node_modules/@types/react-transition-group": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
"integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==",
"dependencies": {
"@types/react": "*"
}
},
"node_modules/@types/scheduler": {
"version": "0.16.2",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
"integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="
},
"node_modules/@types/warning": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz",
"integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA=="
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
......@@ -224,6 +144,25 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
......@@ -308,6 +247,40 @@
"node": ">=8"
}
},
"node_modules/bson": {
"version": "4.6.4",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.6.4.tgz",
"integrity": "sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ==",
"dependencies": {
"buffer": "^5.6.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
......@@ -666,6 +639,14 @@
"node": ">=0.4.0"
}
},
"node_modules/denque": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
"engines": {
"node": ">=0.10"
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
......@@ -1099,6 +1080,25 @@
"node": ">=0.10.0"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/ignore-by-default": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
......@@ -1133,13 +1133,10 @@
"node": ">=10"
}
},
"node_modules/invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"dependencies": {
"loose-envify": "^1.0.0"
}
"node_modules/ip": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
"integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg=="
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
......@@ -1279,6 +1276,11 @@
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
"integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ=="
},
"node_modules/kareem": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz",
"integrity": "sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg=="
},
"node_modules/keyv": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
......@@ -1363,6 +1365,12 @@
"node": ">= 0.6"
}
},
"node_modules/memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"node_modules/merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
......@@ -1442,6 +1450,98 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/mongodb": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz",
"integrity": "sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA==",
"dependencies": {
"bson": "^4.6.2",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.5.2",
"socks": "^2.6.2"
},
"engines": {
"node": ">=12.9.0"
},
"optionalDependencies": {
"saslprep": "^1.0.3"
}
},
"node_modules/mongodb-connection-string-url": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz",
"integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==",
"dependencies": {
"@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0"
}
},
"node_modules/mongoose": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz",
"integrity": "sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw==",
"dependencies": {
"bson": "^4.6.2",
"kareem": "2.3.5",
"mongodb": "4.5.0",
"mpath": "0.9.0",
"mquery": "4.0.3",
"ms": "2.1.3",
"sift": "16.0.0"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mongoose"
}
},
"node_modules/mongoose/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/mpath": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
"integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz",
"integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==",
"dependencies": {
"debug": "4.x"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/mquery/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/mquery/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
......@@ -1671,6 +1771,14 @@
"once": "^1.3.1"
}
},
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"engines": {
"node": ">=6"
}
},
"node_modules/pupa": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz",
......@@ -1910,13 +2018,16 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/scheduler": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.22.0.tgz",
"integrity": "sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ==",
"peer": true,
"node_modules/saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"dependencies": {
"loose-envify": "^1.1.0"
"sparse-bitfield": "^3.0.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/semver": {
......@@ -2011,11 +2122,47 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/sift": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz",
"integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ=="
},
"node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"node_modules/smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
}
},
"node_modules/socks": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz",
"integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==",
"dependencies": {
"ip": "^1.1.5",
"smart-buffer": "^4.2.0"
},
"engines": {
"node": ">= 10.13.0",
"npm": ">= 3.0.0"
}
},
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"dependencies": {
"memory-pager": "^1.0.2"
}
},
"node_modules/spawn-command": {
"version": "0.0.2-1",
"resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
......@@ -2110,6 +2257,17 @@
"nodetouch": "bin/nodetouch.js"
}
},
"node_modules/tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"dependencies": {
"punycode": "^2.1.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/tree-kill": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
......@@ -2260,12 +2418,24 @@
"node": ">= 0.8"
}
},
"node_modules/warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"dependencies": {
"loose-envify": "^1.0.0"
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/widest-line": {
......@@ -2319,6 +2489,14 @@
"node": ">=8"
}
},
"node_modules/xhr2": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.1.tgz",
"integrity": "sha512-sID0rrVCqkVNUn8t6xuv9+6FViXjUVXq8H5rWOH2rz9fDNQEd4g0EA2XlcEdJXRz5BMEn4O1pJFdT+z4YHhoWw==",
"engines": {
"node": ">= 6"
}
},
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
......@@ -2432,39 +2610,20 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz",
"integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA=="
},
"@types/prop-types": {
"version": "15.7.5",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
"integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
"@types/webidl-conversions": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
"integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"@types/react": {
"version": "18.0.9",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz",
"integrity": "sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw==",
"@types/whatwg-url": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
"integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
"requires": {
"@types/prop-types": "*",
"@types/scheduler": "*",
"csstype": "^3.0.2"
"@types/node": "*",
"@types/webidl-conversions": "*"
}
},
"@types/react-transition-group": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
"integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==",
"requires": {
"@types/react": "*"
}
},
"@types/scheduler": {
"version": "0.16.2",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
"integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="
},
"@types/warning": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz",
"integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA=="
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
......@@ -2533,6 +2692,11 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
......@@ -2595,6 +2759,23 @@
"fill-range": "^7.0.1"
}
},
"bson": {
"version": "4.6.4",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.6.4.tgz",
"integrity": "sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ==",
"requires": {
"buffer": "^5.6.0"
}
},
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
......@@ -2854,6 +3035,11 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"denque": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
},
"depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
......@@ -3167,6 +3353,11 @@
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"ignore-by-default": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
......@@ -3192,13 +3383,10 @@
"resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
"integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA=="
},
"invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"requires": {
"loose-envify": "^1.0.0"
}
"ip": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
"integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg=="
},
"ipaddr.js": {
"version": "1.9.1",
......@@ -3293,6 +3481,11 @@
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
"integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ=="
},
"kareem": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz",
"integrity": "sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg=="
},
"keyv": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
......@@ -3355,6 +3548,12 @@
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
......@@ -3410,6 +3609,76 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"mongodb": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz",
"integrity": "sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA==",
"requires": {
"bson": "^4.6.2",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.5.2",
"saslprep": "^1.0.3",
"socks": "^2.6.2"
}
},
"mongodb-connection-string-url": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz",
"integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==",
"requires": {
"@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0"
}
},
"mongoose": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz",
"integrity": "sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw==",
"requires": {
"bson": "^4.6.2",
"kareem": "2.3.5",
"mongodb": "4.5.0",
"mpath": "0.9.0",
"mquery": "4.0.3",
"ms": "2.1.3",
"sift": "16.0.0"
},
"dependencies": {
"ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
}
}
},
"mpath": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
"integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew=="
},
"mquery": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz",
"integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==",
"requires": {
"debug": "4.x"
},
"dependencies": {
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
......@@ -3581,6 +3850,11 @@
"once": "^1.3.1"
}
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"pupa": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz",
......@@ -3755,13 +4029,13 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"scheduler": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.22.0.tgz",
"integrity": "sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ==",
"peer": true,
"saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"requires": {
"loose-envify": "^1.1.0"
"sparse-bitfield": "^3.0.3"
}
},
"semver": {
......@@ -3842,11 +4116,39 @@
"object-inspect": "^1.9.0"
}
},
"sift": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz",
"integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ=="
},
"signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="
},
"socks": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz",
"integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==",
"requires": {
"ip": "^1.1.5",
"smart-buffer": "^4.2.0"
}
},
"sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"requires": {
"memory-pager": "^1.0.2"
}
},
"spawn-command": {
"version": "0.0.2-1",
"resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
......@@ -3914,6 +4216,14 @@
"nopt": "~1.0.10"
}
},
"tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"requires": {
"punycode": "^2.1.1"
}
},
"tree-kill": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
......@@ -4024,12 +4334,18 @@
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
"webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
},
"whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"requires": {
"loose-envify": "^1.0.0"
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
}
},
"widest-line": {
......@@ -4071,6 +4387,11 @@
"resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
"integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q=="
},
"xhr2": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.1.tgz",
"integrity": "sha512-sID0rrVCqkVNUn8t6xuv9+6FViXjUVXq8H5rWOH2rz9fDNQEd4g0EA2XlcEdJXRz5BMEn4O1pJFdT+z4YHhoWw=="
},
"y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
......
{
"scripts": {
"server": "cd server && nodemon server",
"client": "cd client && npm start",
"client": "cd client && export PORT=8080 && set PORT=8080 && npm start --port",
"start": "concurrently --kill-others-on-fail \"npm run server\" \"npm run client\""
},
"dependencies": {
"axios": "^0.27.2",
"bootstrap": "^5.1.3",
"body-parser": "^1.20.0",
"concurrently": "^7.2.1",
"express": "^4.18.1",
"http-proxy-middleware": "^2.0.6",
"mongoose": "^6.3.4",
"nodemon": "^2.0.16",
"react-bootstrap": "^2.4.0"
"xhr2": "^0.2.1"
}
}
......
const express = require('express');
const router = express.Router();
const mongoose = require('mongoose');
const XMLHttpRequest = require('xhr2');
mongoose.connect('mongodb+srv://choieunseok:uA3mhjPcB3DwsuuD@cluster0.2gsua4u.mongodb.net/?retryWrites=true&w=majority');
const db = mongoose.connection
db.on('error', console.error)
db.once('open', () => {
console.log('Connected to mongodb Server')
});
const dayPostList = mongoose.Schema({
date: 'string',
idArray: [{ type: String }]
});
const dayPostListModel = mongoose.model('dayPostList', dayPostList);
const post = mongoose.Schema({
date: 'string',
title: 'string',
content: 'string',
password: 'string'
});
const postModel = mongoose.model('post', post);
const waiting = mongoose.Schema({
date: 'string',
waiting: []
});
const waitingModel = mongoose.model('waiting', waiting);
// router.get('/api', (req, res) => {
// res.send({ test: "hi" });
// });
function getCurrentDate(originDate) {
var date;
if (originDate == null) date = new Date();
else date = new Date(originDate);
var year = date.getFullYear().toString();
var month = date.getMonth() + 1;
month = month < 10 ? '0' + month.toString() : month.toString();
var day = date.getDate();
day = day < 10 ? '0' + day.toString() : day.toString();
return year + '-' + month + '-' + day;
}
function arrayEquals(a, b) {
return Array.isArray(a) &&
Array.isArray(b) &&
a.length === b.length &&
a.every((val, index) => val === b[index]);
}
router.get('/api/getList', async (req, res) => { // 오늘 게시물들의 아이디 표시
try {
const today = getCurrentDate();
var testDayPostList = await dayPostListModel.findOne({ date: today });
if (testDayPostList == null) testDayPostList = new dayPostListModel({ date: today, idArray: [] });
res.send(testDayPostList.idArray);
}
catch (err) {
res.send(err.message);
}
});
router.get('/api/getList/:date', async (req, res) => { // 특정 날자의 게시물들의 아이디 표시
try {
const today = getCurrentDate(req.params.date);
var testDayPostList = await dayPostListModel.findOne({ date: today });
if (testDayPostList == null) testDayPostList = new dayPostListModel({ date: today, idArray: [] });
res.send(testDayPostList.idArray);
}
catch (err) {
res.send(err.message);
}
});
router.get('/api/get', async (req, res) => { // 특정 id(여러개)의 게시물 내용 요약 불러오기
try {
const idArray = req.body.idArray;
var resultArray = [];
for (const id of idArray) {
const onePost = await postModel.findById(id);
var tempJSON = {};
tempJSON.id = onePost.id;
tempJSON.title = onePost.title;
tempJSON.content = onePost.content;
tempJSON.content = tempJSON.content.replace(/(?:\r\n|\r|\n)/g, '');
const sliceLength = 10;
if (tempJSON.content.length > sliceLength) tempJSON.content = tempJSON.content.slice(0, sliceLength) + "...";
resultArray.push(tempJSON);
}
res.send(resultArray);
}
catch (err) {
res.send(err.message);
}
});
router.get('/api/get/:id', async (req, res) => { // 특정 id의 게시물 불러오기
try {
const currentPost = await postModel.findById(req.params.id);
res.send({ title: currentPost.title, content: currentPost.content });
}
catch (err) {
res.send(err.message);
}
});
router.post('/api/isPassEqual', async (req, res) => { // 암호가 같으면 success, 아니면 failed
try {
const currentPost = await postModel.findById(req.body.id);
if (currentPost.password == req.body.password) res.send("success");
else res.send("failed");
}
catch (err) {
res.send("failed");
}
});
router.post('/api/postSave', async (req, res) => { // 오늘 게시물 작성
try {
var isFirst = false;
const today = getCurrentDate();
var testDayPostList = await dayPostListModel.findOne({ date: today });
if (testDayPostList == null) {
testDayPostList = new dayPostListModel({ date: today, idArray: [] });
isFirst = true;
}
var postListArr = testDayPostList.idArray;
var newPost = new postModel({ date: today, title: req.body.title, content: req.body.content, password: req.body.password });
var newPostData = await newPost.save();
postListArr.push(newPostData._id.toString());
if (isFirst) await testDayPostList.save();
else await dayPostListModel.updateOne({ date: today }, { idArray: postListArr });
res.send("success");
}
catch (err) {
res.send(err.message);
}
});
router.put('/api/edit/:id', async (req, res) => { // 게시물 수정
try {
const id = req.params.id;
const title = req.body.title;
const content = req.body.content;
await postModel.findByIdAndUpdate(id, { title: title, content: content });
res.send("success");
}
catch (err) {
res.send(err.message);
}
});
router.delete('/api/delete/:id', async (req, res) => { // 게시물 삭제
try {
const id = req.params.id;
const list = await dayPostListModel.find();
for (const dayList of list) {
var newArray = dayList.idArray.filter((data)=>{return data != id;})
if(!arrayEquals(dayList.idArray, newArray)){
await dayPostListModel.findByIdAndUpdate(dayList._id.toString(), {idArray: newArray});
}
}
await postModel.findByIdAndDelete(id);
res.send("success");
}
catch (err) {
res.send(err.message);
}
});
router.get('/api/waiting', async (req, res) => { // 오늘의 대기시간 목록 가져오기
try {
const today = getCurrentDate();
var waitingList = await waitingModel.findOne({ date: today });
if (waitingList == null) waitingList = []
else waitingList = waitingList. waiting;
res.send(waitingList);
}
catch (err) {
res.send(err.message);
}
});
router.post('/api/waiting', async (req, res) => { // 오늘의 대기시간 목록 추가
try {
const today = getCurrentDate();
var waitingList = await waitingModel.findOne({ date: today });
const date = new Date();
const time = date.getHours() + ":" + date.getMinutes();
const newWaiting = {value: req.body.value, time: time};
if (waitingList == null) await waitingModel({date: today, waiting: [newWaiting]}).save();
else{
waitingList.waiting.push(newWaiting);
await waitingModel.findOneAndUpdate({ date: today }, {waiting: waitingList.waiting});
}
var waitingListResult = await waitingModel.findOne({ date: today });
res.send(waitingListResult);
}
catch (err) {
res.send(err.message);
}
});
function setting(resultJson){
var result = {}
result.fo_date = [resultJson.fo_date1, resultJson.fo_date2, resultJson.fo_date3, resultJson.fo_date4, resultJson.fo_date5];
result.fo_menu_lun = [resultJson.fo_menu_lun1, resultJson.fo_menu_lun2, resultJson.fo_menu_lun3, resultJson.fo_menu_lun4, resultJson.fo_menu_lun5];
result.fo_menu_eve = [resultJson.fo_menu_eve1, resultJson.fo_menu_eve2, resultJson.fo_menu_eve3, resultJson.fo_menu_eve4, resultJson.fo_menu_eve5];
return result;
}
router.get('/api/menuList', async (req, res) => { // 제2기숙사 학식 메뉴 일주일치 불러오기
try {
let newRequest = new XMLHttpRequest();
newRequest.onreadystatechange = () => {
if (newRequest.status == 200 && newRequest.readyState == 4) {
var dt = new Date();
if (dt.getDay() == 0 || dt.getDay() == 6) {
resJSON0 = JSON.parse(newRequest.responseText).root[0].LASTNEXT[0]
resJSON1 = JSON.parse(newRequest.responseText).root[0].LASTNEXT[1]
if (resJSON0.go === "next_mon") {
let nextRequest = new XMLHttpRequest();
nextRequest.onreadystatechange = () => {
if (nextRequest.status == 200 && nextRequest.readyState == 4) {
newResJSON = JSON.parse(nextRequest.responseText).root[0].WEEKLYMENU[0]
res.send(setting(newResJSON));
}
}
nextRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc')
nextRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
nextRequest.send("locgbn=K1&sch_date=" + resJSON0.mon_date + "&fo_gbn=stu")
} else if (resJSON1.go === "next_mon") {
let nextRequest = new XMLHttpRequest();
nextRequest.onreadystatechange = () => {
if (nextRequest.status == 200 && nextRequest.readyState == 4) {
newResJSON = JSON.parse(nextRequest.responseText).root[0].WEEKLYMENU[0]
res.send(setting(newResJSON));
}
}
nextRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc')
nextRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
nextRequest.send("locgbn=K1&sch_date=" + resJSON1.mon_date + "&fo_gbn=stu")
}
}
else {
resJSON = JSON.parse(newRequest.responseText).root[0].WEEKLYMENU[0]
res.send(setting(resJSON));
}
}
}
newRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc')
newRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
newRequest.send("locgbn=K1&sch_date=&fo_gbn=stu")
}
catch (err) {
res.send(err.message);
}
});
router.get('/api/todayMenu', async (req, res) => { // 제2기숙사 학식 메뉴 하루치 불러오기
try {
let newRequest = new XMLHttpRequest();
newRequest.onreadystatechange = () => {
if (newRequest.status == 200 && newRequest.readyState == 4) {
var dt = new Date();
if(dt.getDay() > 0 && dt.getDay() < 6){
resJSON = JSON.parse(newRequest.responseText).root[0].WEEKLYMENU[0];
const weekMenu = setting(resJSON);
const todayMenu = [weekMenu.fo_menu_lun[dt.getDay()-1], weekMenu.fo_menu_eve[dt.getDay()-1]];
res.send(todayMenu);
}else res.send("weekend");
}
}
newRequest.open('POST', 'https://dorm2.khu.ac.kr/food/getWeeklyMenu.kmc')
newRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
newRequest.send("locgbn=K1&sch_date=&fo_gbn=stu")
}
catch (err) {
res.send(err.message);
}
});
// router.get('/api/testSave', async (req, res) => {
// var isFirst = false;
// var testDayPostList = await dayPostListModel.findOne({ date: '2022-05-30' });
// if (testDayPostList == null) {
// testDayPostList = new dayPostListModel({ date: '2022-05-30', idArray: [] });
// isFirst = true;
// }
// var postListArr = testDayPostList.idArray;
// var newPost = new postModel({ date: '2022-05-30', title: '테스트 제목', content: '테스트 내용', password: 'password' });
// var newPostData = await newPost.save();
// postListArr.push(newPostData._id.toString());
// if (isFirst) await testDayPostList.save();
// else await dayPostListModel.updateOne({ date: '2022-05-30' }, { idArray: postListArr });
// res.send("test");
// });
module.exports = router;
const express = require('express');
const router = express.Router();
router.get('/api', (req, res)=>{
res.send({ test: "hi"});
});
module.exports = router;
\ No newline at end of file
const express = require('express');
const app = express();
const test = require('.//Router/test');
const api = require('./Router/api');
let bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use('/', test);
app.use('/', api);
const port=23023;
app.listen(port, ()=>{console.log(`Listening on port ${port}`)});
\ No newline at end of file
const port = 23023;
app.listen(port, () => { console.log(`Listening on port ${port}`) });
\ No newline at end of file
......