From 425fddcf69e2cc091448dac91d148f81dcc2c7e0 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Fri, 27 Sep 2024 23:54:46 +0100 Subject: [PATCH] Fixes webhook use-before-define --- test/server/lib/DocApi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/server/lib/DocApi.ts b/test/server/lib/DocApi.ts index 24ed9ec3..daa929f0 100644 --- a/test/server/lib/DocApi.ts +++ b/test/server/lib/DocApi.ts @@ -64,6 +64,8 @@ let docs: TestServer; let userApi: UserAPIImpl; let extraHeadersForConfig = {}; +const webhooksTestPort = Number(process.env.WEBHOOK_TEST_PORT || 34365); + function makeConfig(username: string): AxiosRequestConfig { const originalConfig = configForUser(username); return { @@ -5385,8 +5387,6 @@ async function getWorkspaceId(api: UserAPIImpl, name: string) { return workspaces.find((w) => w.name === name)!.id; } -const webhooksTestPort = Number(process.env.WEBHOOK_TEST_PORT || 34365); - async function setupDataDir(dir: string) { // we'll be serving Hello.grist content for various document ids, so let's make copies of it in // tmpDir