feat: add shared enviroment variables

This commit is contained in:
Mauricio Siu
2024-11-17 16:13:07 -06:00
parent 3c490ba2d0
commit 7003fe77c9
22 changed files with 8469 additions and 38 deletions

View File

@@ -26,6 +26,7 @@ export const projects = pgTable("project", {
adminId: text("adminId")
.notNull()
.references(() => admins.adminId, { onDelete: "cascade" }),
env: text("env").notNull().default(""),
});
export const projectRelations = relations(projects, ({ many, one }) => ({
@@ -65,10 +66,16 @@ export const apiRemoveProject = createSchema
})
.required();
export const apiUpdateProject = createSchema
.pick({
name: true,
description: true,
projectId: true,
})
.required();
// export const apiUpdateProject = createSchema
// .pick({
// name: true,
// description: true,
// projectId: true,
// env: true,
// })
// .required();
export const apiUpdateProject = createSchema.partial().extend({
projectId: z.string().min(1),
});
// .omit({ serverId: true });