We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc74ecd commit 3eec5dcCopy full SHA for 3eec5dc
1 file changed
server/models/project.js
@@ -34,7 +34,7 @@ const projectSchema = new Schema(
34
default: "Hello p5.js, it's the server",
35
maxlength: 128
36
},
37
- user: { type: Schema.Types.ObjectId, ref: 'User' },
+ user: { type: Schema.Types.ObjectId, ref: 'User', immutable: true },
38
serveSecure: { type: Boolean, default: false },
39
files: { type: [fileSchema] },
40
_id: { type: String, default: shortid.generate },
@@ -43,7 +43,7 @@ const projectSchema = new Schema(
43
enum: ['Private', 'Public'],
44
default: 'Public'
45
46
- slug: { type: String }
+ slug: { type: String, immutable: true }
47
48
{ timestamps: true }
49
);
0 commit comments