Explorar el Código

Remove course id's from everything, just using their actual id's now.

Lee Morgan hace 5 años
padre
commit
ec74e3d1e4
Se han modificado 3 ficheros con 0 adiciones y 10 borrados
  1. 0 2
      controllers/learn.js
  2. 0 4
      models/course.js
  3. 0 4
      views/learn/newCourse.html

+ 0 - 2
controllers/learn.js

@@ -8,7 +8,6 @@ module.exports = {
     req.body = {
         uploaderId: String,
         password: String,
-        courseId:  String,
         title: String
         thumbNail: String,
         description: String
@@ -25,7 +24,6 @@ module.exports = {
 
                 let course = new Course({
                     owner: uploader._id,
-                    courseId: req.body.courseId,
                     title: req.body.title,
                     thumbNail: imgString,
                     description: req.body.description

+ 0 - 4
models/course.js

@@ -6,10 +6,6 @@ const CourseSchema = new mongoose.Schema({
         ref: "Uploader",
         required: true
     },
-    courseId: {
-        type: String,
-        required: true
-    },
     title: {
         type: String,
         required: true

+ 0 - 4
views/learn/newCourse.html

@@ -34,10 +34,6 @@
                 <input name="title" type="text" required>
             </label>
 
-            <label>Course URL string(i.e. "design", "js", "html")
-                <input name="courseId" type="text" required>
-            </label>
-
             <label>ThumbNail (max 1mb)
                 <input name="thumbNail" type="file" required>
             </label>