Skip to content

Commit 8ad84ef

Browse files
authored
Merge pull request #25 from sensebox/feat/tutorials-update
WIP: tutorials update
2 parents 8fdcdbe + 55fe74f commit 8ad84ef

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎models/tutorial.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const QuestionSchema = new mongoose.Schema(
1111
h5plink: String,
1212
type: String,
1313
multipleChoice: Boolean,
14+
freetext: Boolean,
1415
},
1516
{ _id: true }
1617
);
@@ -91,6 +92,10 @@ const TutorialSchema = new mongoose.Schema(
9192
hardware: {
9293
type: [String],
9394
},
95+
customHardware: {
96+
type: Object,
97+
default: undefined,
98+
},
9499
duration: {
95100
type: String,
96101
},

‎routes/tutorial/postTutorial.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const postTutorial = async function (req, res) {
6969
difficulty: req.body.difficulty,
7070
learnings: req.body.learnings,
7171
hardware: req.body.hardware,
72+
customHardware: req.body.customHardware,
7273
public: req.body.public,
7374
review: req.body.review,
7475
steps: req.body.steps,

‎routes/tutorial/putTutorial.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const putTutorial = async function (req, res) {
7474
updatedTutorial.review = req.body.review || oldTutorial.review;
7575
updatedTutorial.steps = req.body.steps || oldTutorial.steps;
7676
updatedTutorial.hardware = req.body.hardware || oldTutorial.hardware;
77+
updatedTutorial.customHardware = req.body.customHardware || oldTutorial.customHardware;
7778
updatedTutorial.learnings = req.body.learnings || oldTutorial.learnings;
7879
updatedTutorial.topics = req.body.topics || oldTutorial.topics;
7980
updatedTutorial.subjects = req.body.subjects || oldTutorial.subjects;

0 commit comments

Comments
 (0)