mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-22 17:29:07 +00:00
Ensure a team overleaf id is unique
This commit is contained in:
parent
c8977ab9d6
commit
8a55994f64
1 changed files with 5 additions and 1 deletions
|
@ -19,7 +19,11 @@ SubscriptionSchema = new Schema
|
|||
planCode: String
|
||||
allowed: {type: Boolean, default: true}
|
||||
overleaf:
|
||||
id: { type: Number }
|
||||
id:
|
||||
type: Number
|
||||
index:
|
||||
unique: true,
|
||||
partialFilterExpression: {'overleaf.id': {$exists: true}}
|
||||
|
||||
|
||||
SubscriptionSchema.statics.findAndModify = (query, update, callback)->
|
||||
|
|
Loading…
Add table
Reference in a new issue