fix: prevent floating point number in image sizes (#1935)

This commit is contained in:
Elliot Lintz
2023-04-24 17:19:26 +02:00
committed by GitHub
parent 90dab3c445
commit 7fcde11fa0

View File

@@ -159,8 +159,8 @@ const collectionSchema = joi.object().keys({
imageSizes: joi.array().items(
joi.object().keys({
name: joi.string(),
width: joi.number().allow(null),
height: joi.number().allow(null),
width: joi.number().integer().allow(null),
height: joi.number().integer().allow(null),
crop: joi.string(), // TODO: add further specificity with joi.xor
}).unknown(),
),