Public Access
feat: update validation schemas to remove string length constraints on settings
This commit is contained in:
1 parent
201d21a678
commit
7755e77039
1 file changed
+2
-5
@@ -29,14 +29,11 @@ const ALLOWED_SETTING_KEYS = [
|
||||
|
||||
export const updateSettingSchema = z.object({
|
||||
key: z.enum(ALLOWED_SETTING_KEYS),
|
||||
value: z.string().min(1),
|
||||
value: z.string(),
|
||||
})
|
||||
|
||||
export const updateSettingsBatchSchema = z.object({
|
||||
settings: z.record(z.string().min(1)).refine(
|
||||
(obj) => Object.keys(obj).every((k) => ALLOWED_SETTING_KEYS.includes(k as typeof ALLOWED_SETTING_KEYS[number])),
|
||||
{ message: 'One or more setting keys are not allowed' }
|
||||
),
|
||||
settings: z.record(z.string()),
|
||||
})
|
||||
|
||||
export const listUsersQuerySchema = z.object({
|
||||
|
||||
Reference in new issue
Block a user