- Create new status page and retrieval are now working end to end, except the fields that currently does not have BE counterparts, including all checkboxes and uploaded logo
This commit is contained in:
1 parent
23d97f8e56
commit
a5df7be6a1
5 files changed
+39
-30
No files matched your search
@@ -158,18 +158,14 @@ const publicPageGeneralSettingsValidation = joi.object({
|
||||
url: joi.string().trim().messages({ "string.empty": "URL is required." }),
|
||||
timezone: joi.string().trim().messages({ "string.empty": "Timezone is required." }),
|
||||
color: joi.string().trim().messages({ "string.empty": "Color is required." }),
|
||||
|
||||
|
||||
theme: joi.string(),
|
||||
monitors: joi
|
||||
.array()
|
||||
.min(1)
|
||||
.items({ id: joi.string(), url: joi.string().required() })
|
||||
.messages({
|
||||
"string.pattern.base": "Must be a valid monitor ID",
|
||||
"array.base": "Monitors must be an array",
|
||||
"array.empty": "At least one monitor is required",
|
||||
"any.required": "Monitors are required",
|
||||
}),
|
||||
monitors: joi.array().min(1).items(joi.string().required()).messages({
|
||||
"string.pattern.base": "Must be a valid monitor ID",
|
||||
"array.base": "Monitors must be an array",
|
||||
"array.empty": "At least one monitor is required",
|
||||
"any.required": "Monitors are required",
|
||||
}),
|
||||
});
|
||||
const settingsValidation = joi.object({
|
||||
ttl: joi.number().required().messages({
|
||||
|
||||
Reference in new issue
Block a user