mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
bdc5360bc0
Use the default Mongoose connection pool for all models GitOrigin-RevId: d227b7eb36f130085c9eb1480dc07bd50ba57768
25 lines
614 B
JavaScript
25 lines
614 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
|
|
const { Schema } = mongoose
|
|
const { ObjectId } = Schema
|
|
|
|
const OauthAuthorizationCodeSchema = new Schema(
|
|
{
|
|
authorizationCode: String,
|
|
expiresAt: Date,
|
|
oauthApplication_id: { type: ObjectId, ref: 'OauthApplication' },
|
|
redirectUri: String,
|
|
scope: String,
|
|
user_id: { type: ObjectId, ref: 'User' }
|
|
},
|
|
{
|
|
collection: 'oauthAuthorizationCodes'
|
|
}
|
|
)
|
|
|
|
exports.OauthAuthorizationCode = mongoose.model(
|
|
'OauthAuthorizationCode',
|
|
OauthAuthorizationCodeSchema
|
|
)
|
|
|
|
exports.OauthAuthorizationCodeSchema = OauthAuthorizationCodeSchema
|