redbean096@khu.ac.kr

fix merge conflict lineDev -> db

This diff could not be displayed because it is too large.
...@@ -3,12 +3,20 @@ ...@@ -3,12 +3,20 @@
3 "version": "0.1.0", 3 "version": "0.1.0",
4 "private": true, 4 "private": true,
5 "dependencies": { 5 "dependencies": {
6 +
6 "@material-ui/core": "^4.11.2", 7 "@material-ui/core": "^4.11.2",
7 "@testing-library/jest-dom": "^5.11.6", 8 "@testing-library/jest-dom": "^5.11.6",
8 "@testing-library/react": "^11.2.2", 9 "@testing-library/react": "^11.2.2",
9 "@testing-library/user-event": "^12.5.0", 10 "@testing-library/user-event": "^12.5.0",
10 "axios": "^0.21.0", 11 "axios": "^0.21.0",
11 "immer": "^8.0.0", 12 "immer": "^8.0.0",
13 + "@material-ui/core": "^4.10.2",
14 + "@testing-library/jest-dom": "^4.2.4",
15 + "@testing-library/react": "^9.3.2",
16 + "@testing-library/user-event": "^7.1.2",
17 + "axios": "^0.19.2",
18 + "eslint": "^7.14.0",
19 + "immer": "^7.0.5",
12 "include-media": "^1.4.9", 20 "include-media": "^1.4.9",
13 "moment": "^2.29.1", 21 "moment": "^2.29.1",
14 "open-color": "^1.7.0", 22 "open-color": "^1.7.0",
...@@ -30,7 +38,10 @@ ...@@ -30,7 +38,10 @@
30 "eject": "react-scripts eject" 38 "eject": "react-scripts eject"
31 }, 39 },
32 "eslintConfig": { 40 "eslintConfig": {
33 - "extends": "react-app" 41 + "extends": "react-app",
42 + "rules": {
43 + "jsx-a11y/anchor-is-valid": "off"
44 + }
34 }, 45 },
35 "browserslist": { 46 "browserslist": {
36 "production": [ 47 "production": [
...@@ -44,5 +55,5 @@ ...@@ -44,5 +55,5 @@
44 "last 1 safari version" 55 "last 1 safari version"
45 ] 56 ]
46 }, 57 },
47 - "proxy": "http://localhost:4000" 58 + "proxy": "http://localhost:4000/"
48 } 59 }
......
...@@ -37,6 +37,7 @@ mongoose ...@@ -37,6 +37,7 @@ mongoose
37 useNewUrlParser: true, 37 useNewUrlParser: true,
38 useFindAndModify: false, 38 useFindAndModify: false,
39 useUnifiedTopology: true, 39 useUnifiedTopology: true,
40 + useCreateIndex : true
40 }) 41 })
41 .then(() => { 42 .then(() => {
42 console.log("Connected to MongoDB"); 43 console.log("Connected to MongoDB");
......
...@@ -14,7 +14,7 @@ exports.register = async (ctx) => { ...@@ -14,7 +14,7 @@ exports.register = async (ctx) => {
14 password: Joi.string().required(), 14 password: Joi.string().required(),
15 }); 15 });
16 16
17 - const result = Joi.validate(ctx.request.body, schema); 17 + const result = schema.validate(ctx.request.body);
18 if (result.error) { 18 if (result.error) {
19 ctx.status = 400; 19 ctx.status = 400;
20 ctx.body = result.error; 20 ctx.body = result.error;
......
...@@ -51,7 +51,7 @@ exports.setProfile = async (ctx) => { ...@@ -51,7 +51,7 @@ exports.setProfile = async (ctx) => {
51 }) 51 })
52 .unknown(); 52 .unknown();
53 console.log(ctx.request.body); 53 console.log(ctx.request.body);
54 - const result = Joi.validate(ctx.request.body, schema); 54 + const result = schema.validate(ctx.request.body);
55 if (result.error) { 55 if (result.error) {
56 ctx.status = 400; 56 ctx.status = 400;
57 ctx.body = result.error; 57 ctx.body = result.error;
......