Mugetsu
Mugetsu2y 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
Mugetsu2y 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
Nick2y ago
literal
Mugetsu
Mugetsu2y ago
Ohh RIGHT! I've missed them somehow... Thanks ❤️