diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..89705fc --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/peetcode.iml b/.idea/peetcode.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/peetcode.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/client/src/Components/AllProblems/AllProblems.jsx b/client/src/Components/AllProblems/AllProblems.jsx index 1e16e6b..a4b180e 100644 --- a/client/src/Components/AllProblems/AllProblems.jsx +++ b/client/src/Components/AllProblems/AllProblems.jsx @@ -32,7 +32,7 @@ const AllProblemsPage = () => { {problems.map((prob,index) => ( - + {prob.title} diff --git a/client/src/Components/Login/Login.jsx b/client/src/Components/Login/Login.jsx index 6cc12bf..329e625 100644 --- a/client/src/Components/Login/Login.jsx +++ b/client/src/Components/Login/Login.jsx @@ -27,6 +27,9 @@ const Login = () => { @@ -79,7 +112,7 @@ const ProblemsPage = () => { } - + ) } diff --git a/client/src/Components/Signup/Signup.jsx b/client/src/Components/Signup/Signup.jsx index 20ca0cf..40db8a0 100644 --- a/client/src/Components/Signup/Signup.jsx +++ b/client/src/Components/Signup/Signup.jsx @@ -38,6 +38,9 @@ const Signup = () => { onClick={async (e) => { const response = await fetch(`${backendUrl}/signup`, { method: "POST", + headers:{ + 'Content-Type':'application/json' + }, body: JSON.stringify({ email: email, password: password, diff --git a/server/index.js b/server/index.js index 9691a83..62ef04c 100644 --- a/server/index.js +++ b/server/index.js @@ -10,7 +10,9 @@ const bodyParser = require("body-parser"); var jsonParser = bodyParser.json(); var urlencodedParser = bodyParser.urlencoded({ extended: false }); const cors = require("cors"); -app.use(cors()); +app.use(cors( + {origin: "*"} +)); app.use(jsonParser); const PROBLEMS = [