Skip to content

Glow #16

@Feven98

Description

@Feven98

It was connecting the comment section to post. It was really confusing and which takes us more time to figure out and it feels good when it work.

const CommentSchema = new mongoose.Schema({
    id: { 
        type: Number
    },
    comment: {
        type: String,
        required : true,
        max: 300
    },
    post:{
        type: mongoose.Schema.Types.ObjectId,
        ref: 'Post',
        required: true
    }
}, {timestamps: true})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions