mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
65976cb363
Upgrade Mongoose and the Mongo driver in web GitOrigin-RevId: 2cad1aabe57eae424a9e4c68b2e0062f0e78ffaf
26 lines
637 B
JavaScript
26 lines
637 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',
|
|
minimize: false,
|
|
}
|
|
)
|
|
|
|
exports.OauthAuthorizationCode = mongoose.model(
|
|
'OauthAuthorizationCode',
|
|
OauthAuthorizationCodeSchema
|
|
)
|
|
|
|
exports.OauthAuthorizationCodeSchema = OauthAuthorizationCodeSchema
|