2017-10-12 10:08:48 -04:00
|
|
|
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 } }
|
|
|
|
|
2017-11-22 08:37:57 -05:00
|
|
|
conn = mongoose.createConnection(Settings.mongo.url, {
|
|
|
|
server: {poolSize: Settings.mongo.poolSize || 10},
|
|
|
|
config: {autoIndex: false}
|
|
|
|
})
|
2017-10-12 10:08:48 -04:00
|
|
|
|
|
|
|
UserStub = conn.model('UserStub', UserStubSchema)
|
|
|
|
|
|
|
|
model = mongoose.model 'UserStub', UserStubSchema
|
|
|
|
exports.UserStub = UserStub
|