Fix an embarassing mistake, generate tokens dynamically, not once.

This commit is contained in:
Shane Kilkelly 2017-10-06 13:24:10 +01:00
parent 1500976226
commit 387854db7a

View file

@ -36,11 +36,11 @@ ProjectSchema = new Schema
tokens :
readOnly : {
type: String,
default: ProjectTokenGenerator.readOnlyToken()
default: () -> ProjectTokenGenerator.readOnlyToken()
}
readAndWrite : {
type: String,
default: ProjectTokenGenerator.readAndWriteToken()
default: () -> ProjectTokenGenerator.readAndWriteToken()
}
tokenAccessReadOnly_refs : [ type:ObjectId, ref:'User' ]
tokenAccessReadAndWrite_refs : [ type:ObjectId, ref:'User' ]