mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-04 22:00:01 -06:00
fix: unable to save legacy surveys (#2280)
This commit is contained in:
@@ -53,7 +53,7 @@ export type TUserObjective = z.infer<typeof ZUserObjective>;
|
||||
|
||||
export const ZSurveyWelcomeCard = z.object({
|
||||
enabled: z.boolean(),
|
||||
headline: z.optional(z.string()),
|
||||
headline: z.string().optional(),
|
||||
html: z.string().optional(),
|
||||
fileUrl: z.string().optional(),
|
||||
buttonLabel: z.string().optional(),
|
||||
|
||||
@@ -4,7 +4,7 @@ import { env } from "./env";
|
||||
|
||||
export const IS_FORMBRICKS_CLOUD = env.IS_FORMBRICKS_CLOUD === "1";
|
||||
export const REVALIDATION_INTERVAL = 0; //TODO: find a good way to cache and revalidate data when it changes
|
||||
export const SERVICES_REVALIDATION_INTERVAL = 60 * 30; // 30 minutes
|
||||
export const SERVICES_REVALIDATION_INTERVAL = 60 * 60 * 3; // 3 hours
|
||||
export const MAU_LIMIT = IS_FORMBRICKS_CLOUD ? 9000 : 1000000;
|
||||
|
||||
// URLs
|
||||
|
||||
@@ -10,7 +10,7 @@ export const validateInputs = (...pairs: ValidationPair[]): void => {
|
||||
|
||||
if (!inputValidation.success) {
|
||||
console.error(
|
||||
`Validation failed for ${value} and ${JSON.stringify(schema)}: ${inputValidation.error.message}`
|
||||
`Validation failed for ${JSON.stringify(value, null, 2)} and ${JSON.stringify(schema)}: ${inputValidation.error.message}`
|
||||
);
|
||||
throw new ValidationError("Validation failed");
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export enum TSurveyQuestionType {
|
||||
|
||||
export const ZSurveyWelcomeCard = z.object({
|
||||
enabled: z.boolean(),
|
||||
headline: ZI18nString,
|
||||
headline: ZI18nString.optional(),
|
||||
html: ZI18nString.optional(),
|
||||
fileUrl: z.string().optional(),
|
||||
buttonLabel: ZI18nString.optional(),
|
||||
|
||||
Reference in New Issue
Block a user