feat: add preview image builder
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { insertMachineSchema } from "@/db/schema";
|
||||
import { insertMachineSchema, machinesTable } from "@/db/schema";
|
||||
import { createInsertSchema } from "drizzle-zod";
|
||||
|
||||
export const addMachineSchema = insertMachineSchema.pick({
|
||||
name: true,
|
||||
@@ -6,3 +7,14 @@ export const addMachineSchema = insertMachineSchema.pick({
|
||||
type: true,
|
||||
auth_token: true,
|
||||
});
|
||||
|
||||
export const insertCustomMachineSchema = createInsertSchema(machinesTable, {
|
||||
name: (schema) => schema.name.default("My Machine"),
|
||||
type: (schema) => schema.type.default("modal-serverless"),
|
||||
});
|
||||
|
||||
export const addCustomMachineSchema = insertCustomMachineSchema.pick({
|
||||
name: true,
|
||||
type: true,
|
||||
snapshot: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user