overleaf/services/web/app/coffee/models/UserStub.coffee
Ersun Warncke 8377005187 Revert "Revert "oauth and collabratec migration""
This reverts commit c8814e7fd85776feb37bf8fad95038349b36cd9a.

GitOrigin-RevId: 9deeb445917c856acee54ef793575c8ab9c81304
2019-05-14 10:24:04 +00:00

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