mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-02 00:36:38 +00:00
backend for updating maintenance screen
This commit is contained in:
committed by
Owen Schwartz
parent
d2fa55dd11
commit
c033fd4e8b
@@ -48,7 +48,13 @@ const updateHttpResourceBodySchema = z
|
|||||||
headers: z
|
headers: z
|
||||||
.array(z.strictObject({ name: z.string(), value: z.string() }))
|
.array(z.strictObject({ name: z.string(), value: z.string() }))
|
||||||
.nullable()
|
.nullable()
|
||||||
.optional()
|
.optional(),
|
||||||
|
// Maintenance mode fields
|
||||||
|
maintenanceModeEnabled: z.boolean().optional(),
|
||||||
|
maintenanceModeType: z.enum(["forced", "automatic"]).optional(),
|
||||||
|
maintenanceTitle: z.string().max(255).nullable().optional(),
|
||||||
|
maintenanceMessage: z.string().max(2000).nullable().optional(),
|
||||||
|
maintenanceEstimatedTime: z.string().max(100).nullable().optional(),
|
||||||
})
|
})
|
||||||
.refine((data) => Object.keys(data).length > 0, {
|
.refine((data) => Object.keys(data).length > 0, {
|
||||||
error: "At least one field must be provided for update"
|
error: "At least one field must be provided for update"
|
||||||
|
|||||||
Reference in New Issue
Block a user