From abd187d8b1c757e6c321e619853022fa61180cb7 Mon Sep 17 00:00:00 2001 From: "Yoon, Daeki" Date: Tue, 29 Sep 2020 23:09:10 +0900 Subject: [PATCH] =?UTF-8?q?edit=20problem=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nodemon.json | 6 ++ src/client/src/MainRouter.jsx | 8 ++ src/client/src/core/Menu.jsx | 6 +- src/client/src/quiz/EditProblem.jsx | 11 +++ src/client/src/quiz/NewProblem.jsx | 76 ++++++++++++++++++ src/client/src/quiz/NewQuiz.jsx | 53 +++++++++++++ src/client/src/quiz/Problem.jsx | 23 ++++++ src/client/src/quiz/Problems.jsx | 11 +++ src/client/src/quiz/Quiz.jsx | 38 +++++++++ src/client/src/quiz/api-quiz.js | 39 ++++++++++ src/server/quiz/answer.model.js | 6 +- .../{question.model.js => problem.model.js} | 8 +- src/server/quiz/quiz.controller.js | 78 ++++++++++++++----- src/server/quiz/quiz.model.js | 5 +- src/server/quiz/quiz.routes.js | 4 + src/server/user/user.controller.js | 1 + 16 files changed, 343 insertions(+), 30 deletions(-) create mode 100644 nodemon.json create mode 100644 src/client/src/quiz/EditProblem.jsx create mode 100644 src/client/src/quiz/NewProblem.jsx create mode 100644 src/client/src/quiz/NewQuiz.jsx create mode 100644 src/client/src/quiz/Problem.jsx create mode 100644 src/client/src/quiz/Problems.jsx create mode 100644 src/client/src/quiz/Quiz.jsx create mode 100644 src/client/src/quiz/api-quiz.js rename src/server/quiz/{question.model.js => problem.model.js} (68%) diff --git a/nodemon.json b/nodemon.json new file mode 100644 index 0000000..ed8c053 --- /dev/null +++ b/nodemon.json @@ -0,0 +1,6 @@ +{ + "watch": ["src/server"], + "env": { + "NODE_ENV": "development" + } +} \ No newline at end of file diff --git a/src/client/src/MainRouter.jsx b/src/client/src/MainRouter.jsx index 3e2cc11..5653606 100644 --- a/src/client/src/MainRouter.jsx +++ b/src/client/src/MainRouter.jsx @@ -3,6 +3,8 @@ import { Route, Switch } from "react-router-dom"; import Signin from "./auth/Signin"; import Home from "./core/Home"; import Menu from "./core/Menu"; +import NewQuiz from './quiz/NewQuiz' +import Quiz from './quiz/Quiz' function MainRouter() { return ( @@ -16,6 +18,12 @@ function MainRouter() { + + + + + + // diff --git a/src/client/src/core/Menu.jsx b/src/client/src/core/Menu.jsx index 19ec027..5927f80 100644 --- a/src/client/src/core/Menu.jsx +++ b/src/client/src/core/Menu.jsx @@ -14,13 +14,13 @@ function Menu() { return ( - +