Update tests and refactor user query: Add 'endpointSpecSwarm' to application test cases and rename user variable in Stripe webhook to improve clarity and consistency.

This commit is contained in:
Mauricio Siu
2025-11-08 14:12:01 -06:00
parent fb2bb99a2c
commit b99d532582
3 changed files with 4 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ const baseApp: ApplicationNested = {
triggerType: "push",
appName: "",
autoDeploy: true,
endpointSpecSwarm: null,
serverId: "",
registryUrl: "",
branch: null,

View File

@@ -15,6 +15,7 @@ const baseApp: ApplicationNested = {
giteaId: "",
cleanCache: false,
applicationStatus: "done",
endpointSpecSwarm: null,
appName: "",
autoDeploy: true,
enableSubmodules: false,

View File

@@ -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) => {