add unique index to both token fields

This commit is contained in:
Shane Kilkelly 2017-10-27 14:58:55 +01:00
parent a57827458d
commit 239f56ca0e

View file

@ -33,8 +33,8 @@ ProjectSchema = new Schema
imageName : { type: String }
track_changes : { type: Object }
tokens :
readOnly : { type: String }
readAndWrite : { type: String }
readOnly : { type: String, index: {unique: true} }
readAndWrite : { type: String, index: {unique: true} }
tokenAccessReadOnly_refs : [ type:ObjectId, ref:'User' ]
tokenAccessReadAndWrite_refs : [ type:ObjectId, ref:'User' ]
overleaf :