From 1bee808551d234e693fe0406ba6084d62dd75b64 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Thu, 24 Mar 2022 16:31:15 +0000 Subject: [PATCH] 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 --- services/web/scripts/undelete_project_to_user.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/scripts/undelete_project_to_user.js b/services/web/scripts/undelete_project_to_user.js index 627e6eb1fb..7482f9eaba 100644 --- a/services/web/scripts/undelete_project_to_user.js +++ b/services/web/scripts/undelete_project_to_user.js @@ -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 }) }