-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- The first one will be adding owner field to our post schema so the person who post can only delete or edit the post he created.
- The second one is adding authentication. We tried to implement it in the code but because we are getting errors we removed that one.
const userSchema = new mongoose.Schema(
{
username: {
type: String,
required: true,
unique: true,
},
password: {
type: String,
required: true,
},
},
{
timestamps: true,
id: false,
toJSON: {
virtuals: true,
transform: (_doc, ret) => {
delete ret.password
return ret
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels