x
This commit is contained in:
1 parent
913cbef765
commit
173c583787
22 files changed
+2847
-364
No files matched your search
@@ -16,6 +16,7 @@ import {
|
||||
ScentNotesBreakdownSectionPayloadSchema,
|
||||
QuoteCalloutSectionPayloadSchema,
|
||||
ProductCarouselSectionPayloadSchema,
|
||||
ProductLayoutSectionPayloadSchema,
|
||||
AccordionSectionPayloadSchema,
|
||||
ContactInfoSectionPayloadSchema,
|
||||
ContactFormSectionPayloadSchema,
|
||||
@@ -536,7 +537,7 @@ export const pagesRoute = new Elysia({ prefix: "/pages" })
|
||||
}
|
||||
});
|
||||
|
||||
function validateSectionPayload(
|
||||
export function validateSectionPayload(
|
||||
type: string,
|
||||
payload: any,
|
||||
): { success: boolean; issues?: z.ZodIssue[]; data?: any } {
|
||||
@@ -594,6 +595,13 @@ function validateSectionPayload(
|
||||
case "PRODUCT_CAROUSEL":
|
||||
schema = ProductCarouselSectionPayloadSchema;
|
||||
break;
|
||||
case "PRODUCT_MAIN":
|
||||
case "PRODUCT_DETAILS":
|
||||
case "PRODUCT_SPECS":
|
||||
case "PRODUCT_REVIEWS":
|
||||
case "RELATED_PRODUCTS":
|
||||
schema = ProductLayoutSectionPayloadSchema;
|
||||
break;
|
||||
case "ACCORDION":
|
||||
schema = AccordionSectionPayloadSchema;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user