Skip to content

Commit 03a1f16

Browse files
authored
changes in backend to accommodate new number input field in join section (#964)
* changes in backend to accommodate new number input field in join section * removing the error in test script * rectifying few errors * trying to rectify yarn.lock * refactored the code
1 parent 0afb67b commit 03a1f16

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

controllers/users.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ const addUserIntro = async (req, res) => {
364364
funFact: rawData.funFact,
365365
forFun: rawData.forFun,
366366
whyRds: rawData.whyRds,
367+
numberOfHours: rawData.numberOfHours,
367368
},
368369
foundFrom: rawData.foundFrom,
369370
};

middlewares/validators/user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const validateJoinData = async (req, res, next) => {
6868
funFact: joi.string().min(100).required(),
6969
whyRds: joi.string().min(100).required(),
7070
flowState: joi.string().optional(),
71+
numberOfHours: joi.number().min(1).max(100).required(),
7172
});
7273

7374
try {

scripts/tests/tdd-files-list.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
test/integration/<replace>.test.js
2-
test/integration/<replace>>.test.js
2+
test/integration/<replace>.test.js
33
test/unit/<replace>/<replace>.test.js
44
test/unit/<replace>/<replace>.test.js
55
test/unit/<replace>/<replace>.test.js

test/fixtures/user/join.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)