add unique index to both token fields
This commit is contained in:
@@ -33,8 +33,8 @@ ProjectSchema = new Schema
|
|||||||
imageName : { type: String }
|
imageName : { type: String }
|
||||||
track_changes : { type: Object }
|
track_changes : { type: Object }
|
||||||
tokens :
|
tokens :
|
||||||
readOnly : { type: String }
|
readOnly : { type: String, index: {unique: true} }
|
||||||
readAndWrite : { type: String }
|
readAndWrite : { type: String, index: {unique: true} }
|
||||||
tokenAccessReadOnly_refs : [ type:ObjectId, ref:'User' ]
|
tokenAccessReadOnly_refs : [ type:ObjectId, ref:'User' ]
|
||||||
tokenAccessReadAndWrite_refs : [ type:ObjectId, ref:'User' ]
|
tokenAccessReadAndWrite_refs : [ type:ObjectId, ref:'User' ]
|
||||||
overleaf :
|
overleaf :
|
||||||
|
|||||||
Reference in New Issue
Block a user