mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[web] schedule domain reverification GitOrigin-RevId: 08217692960379d0a6f7ce457032b1182fb2bf4e
32 lines
697 B
JavaScript
32 lines
697 B
JavaScript
/* eslint-disable no-unused-vars */
|
|
|
|
import Helpers from './lib/helpers.mjs'
|
|
|
|
const tags = ['saas', 'nonblocking']
|
|
|
|
// Supports the daily scheduler query in scripts/verify_domains.mjs which
|
|
// filters on status and lastVerificationAttemptAt.
|
|
const indexes = [
|
|
{
|
|
key: { status: 1, lastVerificationAttemptAt: 1 },
|
|
name: 'status_1_lastVerificationAttemptAt_1',
|
|
},
|
|
]
|
|
|
|
const migrate = async client => {
|
|
const { db } = client
|
|
|
|
await Helpers.addIndexesToCollection(db.domainVerifications, indexes)
|
|
}
|
|
|
|
const rollback = async client => {
|
|
const { db } = client
|
|
await Helpers.dropIndexesFromCollection(db.domainVerifications, indexes)
|
|
}
|
|
|
|
export default {
|
|
tags,
|
|
migrate,
|
|
rollback,
|
|
}
|