♻️ set approval state nullable

This commit is contained in:
Fred KISSIE
2026-01-15 01:03:02 +01:00
parent fc0ec0d754
commit 9040f9b82a
6 changed files with 16 additions and 19 deletions

View File

@@ -693,9 +693,9 @@ export const clients = pgTable("clients", {
maxConnections: integer("maxConnections"),
archived: boolean("archived").notNull().default(false),
blocked: boolean("blocked").notNull().default(false),
approvalState: varchar("approvalState")
.$type<"pending" | "approved" | "denied">()
.default("approved")
approvalState: varchar("approvalState").$type<
"pending" | "approved" | "denied"
>()
});
export const clientSitesAssociationsCache = pgTable(

View File

@@ -388,9 +388,9 @@ export const clients = sqliteTable("clients", {
lastHolePunch: integer("lastHolePunch"),
archived: integer("archived", { mode: "boolean" }).notNull().default(false),
blocked: integer("blocked", { mode: "boolean" }).notNull().default(false),
approvalState: text("approvalState")
.$type<"pending" | "approved" | "denied">()
.default("approved")
approvalState: text("approvalState").$type<
"pending" | "approved" | "denied"
>()
});
export const clientSitesAssociationsCache = sqliteTable(

View File

@@ -204,7 +204,7 @@ export async function calculateUserClientsForOrgs(
olmId: olm.olmId,
type: "olm",
niceId,
approvalState: requireApproval ? "pending" : "approved"
approvalState: requireApproval ? "pending" : null
};
// Create the client