mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Ensure a team overleaf id is unique
This commit is contained in:
@@ -19,7 +19,11 @@ SubscriptionSchema = new Schema
|
|||||||
planCode: String
|
planCode: String
|
||||||
allowed: {type: Boolean, default: true}
|
allowed: {type: Boolean, default: true}
|
||||||
overleaf:
|
overleaf:
|
||||||
id: { type: Number }
|
id:
|
||||||
|
type: Number
|
||||||
|
index:
|
||||||
|
unique: true,
|
||||||
|
partialFilterExpression: {'overleaf.id': {$exists: true}}
|
||||||
|
|
||||||
|
|
||||||
SubscriptionSchema.statics.findAndModify = (query, update, callback)->
|
SubscriptionSchema.statics.findAndModify = (query, update, callback)->
|
||||||
|
|||||||
Reference in New Issue
Block a user