refactor(structure): move legacy import and remove lib leftovers
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { z } from "zod"
|
||||
|
||||
const ACCEPTED_MIME_TYPES = ["text/csv", "text/comma-separated-values"]
|
||||
|
||||
export const importSchema = z.object({
|
||||
file: z.file().refine((file) => ACCEPTED_MIME_TYPES.includes(file.type), {
|
||||
error: "File must be a CSV",
|
||||
}),
|
||||
categoryId: z.string().optional(),
|
||||
})
|
||||
|
||||
export type ImportFormType = z.infer<typeof importSchema>
|
||||
Reference in New Issue
Block a user