mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 19:34:26 +00:00
a68b0b2793
[web] add endpoint for checking on prior usage of Writefull oauth GitOrigin-RevId: a8ecc06b7f045237773cdb5c073c2f7d7abd04f9
25 lines
519 B
JavaScript
25 lines
519 B
JavaScript
const Helpers = require('./lib/helpers')
|
|
|
|
exports.tags = ['saas']
|
|
|
|
const index = {
|
|
key: {
|
|
oauthApplication_id: 1,
|
|
},
|
|
name: 'oauthApplication_id_1',
|
|
partialFilterExpression: {
|
|
oauthApplication_id: {
|
|
$exists: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
exports.migrate = async client => {
|
|
const { db } = client
|
|
await Helpers.addIndexesToCollection(db.oauthAccessTokens, [index])
|
|
}
|
|
|
|
exports.rollback = async client => {
|
|
const { db } = client
|
|
await Helpers.dropIndexesFromCollection(db.oauthAccessTokens, [index])
|
|
}
|