Fixes webhook use-before-define

This commit is contained in:
Spoffy 2024-09-27 23:54:46 +01:00
parent 5b79d4b206
commit 425fddcf69

View File

@ -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