mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Merge pull request #21427 from overleaf/jpa-populate-db-on-import
[web] populate db with collections on import, ahead of waitForDb() call GitOrigin-RevId: 7eb4cd61c2052187acd9947d7060f54d9822d314
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
import { OauthApplication } from '../app/src/models/OauthApplication.js'
|
||||
import parseArgs from 'minimist'
|
||||
import OError from '@overleaf/o-error'
|
||||
import { waitForDb } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
async function _removeOauthApplication(appId) {
|
||||
if (!appId) {
|
||||
throw new OError('No app id supplied')
|
||||
}
|
||||
console.log('Waiting for db...')
|
||||
await waitForDb()
|
||||
console.log(`Removing oauthApplication with id=${appId}`)
|
||||
const result = await OauthApplication.deleteOne({ id: appId })
|
||||
console.log('Result', result)
|
||||
|
||||
Reference in New Issue
Block a user