mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
935877222a
* make v2 system of record for collabratec id * migrate oauth apps, tokens to v2 * set collabratec id on reg/link from ctec * copy collabratec id from user stub to user on merge GitOrigin-RevId: 4ac63921b030a01ed79bc0da1666d3c9f9545248
22 lines
672 B
CoffeeScript
22 lines
672 B
CoffeeScript
Settings = require "settings-sharelatex"
|
|
mongoose = require('mongoose')
|
|
Schema = mongoose.Schema
|
|
ObjectId = Schema.ObjectId
|
|
|
|
UserStubSchema = new Schema
|
|
email : { type : String, default : '' }
|
|
first_name : { type : String, default : '' }
|
|
last_name : { type : String, default : '' }
|
|
overleaf : { id: { type: Number } }
|
|
thirdPartyIdentifiers: { type: Array, default: [] }
|
|
confirmed_at: Date
|
|
|
|
conn = mongoose.createConnection(Settings.mongo.url, {
|
|
server: {poolSize: Settings.mongo.poolSize || 10},
|
|
config: {autoIndex: false}
|
|
})
|
|
|
|
UserStub = conn.model('UserStub', UserStubSchema)
|
|
|
|
model = mongoose.model 'UserStub', UserStubSchema
|
|
exports.UserStub = UserStub
|