Skip to content

Commit

Permalink
chore: Get course detail from db
Browse files Browse the repository at this point in the history
  • Loading branch information
DaisukiDaYo committed Mar 31, 2024
1 parent 35a8049 commit 2369d51
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/controllers/getCourse.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
const CourseModel = require("../models/course");

export const getCourse = async (req, res) => {
const courseId = req.params.courseId;
const data = {
courseName: "Test Course",
duration: "1",
outline: "Fundamental: Why What and How of Design Thinking\n Workshop: How to facilitates and tools recommend\n Incremental: Do design thininkg by team",
images: ["a", "b"],
trainers: [{
name: "I AM",
image: "c",
experience: "trainer experience"
}]
};
const data = await CourseModel.findById(courseId);
res.send(data);
}

0 comments on commit 2369d51

Please sign in to comment.