mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #7220 from overleaf/jpa-wait-for-db
[web] scripts/undelete_project_to_user: add missing wait for db call GitOrigin-RevId: 80a767d26ee529c0aabf8ce11a010dca4a51be2b
This commit is contained in:
parent
d993144fec
commit
1bee808551
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
const minimist = require('minimist')
|
||||
const { waitForDb } = require('../app/src/infrastructure/mongodb')
|
||||
const ProjectDeleter = require('../app/src/Features/Project/ProjectDeleter')
|
||||
|
||||
async function main() {
|
||||
|
@ -10,6 +11,7 @@ async function main() {
|
|||
throw new Error('set --project-id and --user-id')
|
||||
}
|
||||
console.log(`Restoring project ${projectId} to user ${userId}`)
|
||||
await waitForDb()
|
||||
await ProjectDeleter.promises.undeleteProject(projectId, { userId })
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue