From b99d532582fe57fa9fb0fb6540feb468b5d6f372 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 8 Nov 2025 14:12:01 -0600 Subject: [PATCH] Update tests and refactor user query: Add 'endpointSpecSwarm' to application test cases and rename user variable in Stripe webhook to improve clarity and consistency. --- apps/dokploy/__test__/drop/drop.test.ts | 1 + apps/dokploy/__test__/traefik/traefik.test.ts | 1 + apps/dokploy/pages/api/stripe/webhook.ts | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/__test__/drop/drop.test.ts b/apps/dokploy/__test__/drop/drop.test.ts index cbfebbfac..112a4b25e 100644 --- a/apps/dokploy/__test__/drop/drop.test.ts +++ b/apps/dokploy/__test__/drop/drop.test.ts @@ -42,6 +42,7 @@ const baseApp: ApplicationNested = { triggerType: "push", appName: "", autoDeploy: true, + endpointSpecSwarm: null, serverId: "", registryUrl: "", branch: null, diff --git a/apps/dokploy/__test__/traefik/traefik.test.ts b/apps/dokploy/__test__/traefik/traefik.test.ts index 7b39eeb4f..5b48b1248 100644 --- a/apps/dokploy/__test__/traefik/traefik.test.ts +++ b/apps/dokploy/__test__/traefik/traefik.test.ts @@ -15,6 +15,7 @@ const baseApp: ApplicationNested = { giteaId: "", cleanCache: false, applicationStatus: "done", + endpointSpecSwarm: null, appName: "", autoDeploy: true, enableSubmodules: false, diff --git a/apps/dokploy/pages/api/stripe/webhook.ts b/apps/dokploy/pages/api/stripe/webhook.ts index 9c7cf7113..b44b63d45 100644 --- a/apps/dokploy/pages/api/stripe/webhook.ts +++ b/apps/dokploy/pages/api/stripe/webhook.ts @@ -252,10 +252,10 @@ const disableServers = async (userId: string) => { }; const findUserByStripeCustomerId = async (stripeCustomerId: string) => { - const user = db.query.user.findFirst({ + const userResult = await db.query.user.findFirst({ where: eq(user.stripeCustomerId, stripeCustomerId), }); - return user; + return userResult; }; const activateServer = async (serverId: string) => {