Skip to content

Commit d0da94b

Browse files
authored
Merge pull request #39 from Gautam-04/Login
Fixed the signup issue from backend
2 parents 59ff0be + a1c580b commit d0da94b

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

Backend/controllers/UserController.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ const User = require('../Models/Person');
33

44
// Signup controller
55
exports.signup = async (req, res) => {
6+
const { name, email, password } = req.body;
67
try {
7-
const user = await User.create(req.body);
8+
const user = await User.create({ name, email, password });
89
const token = generateToken(user._id);
910
res.json({ token });
1011
} catch (err) {

client/package-lock.json

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@testing-library/jest-dom": "^5.17.0",
88
"@testing-library/react": "^13.4.0",
99
"@testing-library/user-event": "^13.5.0",
10+
"@vercel/speed-insights": "^1.0.10",
1011
"antd": "^5.12.4",
1112
"axios": "^1.5.1",
1213
"bootstrap": "^5.3.2",

client/src/App.js

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import OutPutDoc from "./pages/Pdf Docs/OutPutDoc";
2525
import Profile from "./pages/Profile/Profile";
2626
import Section139_9 from "./pages/Taxes/About Taxes/FAQs/section-139(9)";
2727
import Section142_1 from "./pages/Taxes/About Taxes/FAQs/section-142(1)";
28+
import { SpeedInsights } from "@vercel/speed-insights/react";
2829

2930
const TRACKING_ID = "G-XLC8JY1HWM"; // OUR_TRACKING_ID
3031
ReactGA.initialize(TRACKING_ID, { debug: true });
@@ -194,6 +195,7 @@ function App() {
194195
/>
195196
</Routes>
196197
{!isBlankDocRoute && !loading && <Footer />}
198+
<SpeedInsights />
197199
<ToastContainer
198200
position="bottom-center"
199201
autoClose={5000}

0 commit comments

Comments
 (0)