Skip to content

Commit

Permalink
fix server for now
Browse files Browse the repository at this point in the history
  • Loading branch information
AVtheking committed Nov 29, 2023
1 parent f9cc9b6 commit c280190
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions models/user_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,44 @@ const userSchema = new mongoose.Schema({
profileimg: {
type: String,
},
// createdCourse: [
// {
// type: mongoose.Schema.Types.ObjectId,
// ref: "Course",
// },
// ],
// ownedCourse: [
// {
// courseId: {
// type: mongoose.Schema.Types.ObjectId,
// ref: "Course",
// },
// completedVideo: [
// {
// type: mongoose.Schema.Types.ObjectId,
// ref: "Video",
// },
// ],
// },
// ],
// cart: [
// {
// type: mongoose.Schema.Types.ObjectId,
// ref: "Course",
// },
// ],
// wishlist: [
// {
// type: mongoose.Schema.Types.ObjectId,
// ref: "Course",
// },
// ],
// completedCourse: [
// {
// type: mongoose.Schema.Types.ObjectId,
// ref: "Course",
// },
// ],
createdCourse: [
{
type: mongoose.Schema.Types.ObjectId,
ref: "Course",
},
],
ownedCourse: [
{
courseId: {
type: mongoose.Schema.Types.ObjectId,
ref: "Course",
},
completedVideo: [
{
type: mongoose.Schema.Types.ObjectId,
ref: "Video",
},
],
},
],
cart: [
{
type: mongoose.Schema.Types.ObjectId,
ref: "Course",
},
],
wishlist: [
{
type: mongoose.Schema.Types.ObjectId,
ref: "Course",
},
],
completedCourse: [
{
type: mongoose.Schema.Types.ObjectId,
ref: "Course",
},
],
wallet: {
type: Number,
default: 0,
Expand All @@ -90,8 +90,8 @@ const userSchema = new mongoose.Schema({
default: false,
},
});
// userSchema.path("createdCourse").default(() => []);
// userSchema.path("ownedCourse").default(() => []);
userSchema.path("createdCourse").default(() => []);
userSchema.path("ownedCourse").default(() => []);

const User = new mongoose.model("User", userSchema);
module.exports = User;

0 comments on commit c280190

Please sign in to comment.