Mugetsu
Mugetsu16mo ago

Frozen input param

Is it possible to define a parameter on input schema (zod) that will have a hardcoded/frozen value wich should not be changed? So the value is like predefined in the schema but should be like not accessible via the client to modify? Or shall I add it in the procedure or something
3 Replies
Mugetsu
Mugetsu16mo ago
I guess something like this should work right?
fields: z
.enum(['addressDetails,format,lifecycle'])
.default('addressDetails,format,lifecycle'),
fields: z
.enum(['addressDetails,format,lifecycle'])
.default('addressDetails,format,lifecycle'),
Nick
Nick16mo ago
literal
Mugetsu
Mugetsu16mo ago
Ohh RIGHT! I've missed them somehow... Thanks ❤️