1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-10 17:53:36 +02:00

fix: add default value to impressionData

This commit is contained in:
Fredrik Oseberg 2022-01-28 11:29:54 +01:00
parent 861ec548ba
commit 55e535975c

View File

@ -56,7 +56,12 @@ export const featureMetadataSchema = joi
archived: joi.boolean().default(false), archived: joi.boolean().default(false),
type: joi.string().default('release'), type: joi.string().default('release'),
description: joi.string().allow('').allow(null).optional(), description: joi.string().allow('').allow(null).optional(),
impressionData: joi.boolean().allow(true).allow(false).optional(), impressionData: joi
.boolean()
.allow(true)
.allow(false)
.default(false)
.optional(),
createdAt: joi.date().optional().allow(null), createdAt: joi.date().optional().allow(null),
}) })
.options({ allowUnknown: false, stripUnknown: true, abortEarly: false }); .options({ allowUnknown: false, stripUnknown: true, abortEarly: false });
@ -71,7 +76,12 @@ export const featureSchema = joi
type: joi.string().default('release'), type: joi.string().default('release'),
project: joi.string().default('default'), project: joi.string().default('default'),
description: joi.string().allow('').allow(null).optional(), description: joi.string().allow('').allow(null).optional(),
impressionData: joi.boolean().allow(true).allow(false).optional(), impressionData: joi
.boolean()
.allow(true)
.allow(false)
.default(false)
.optional(),
strategies: joi strategies: joi
.array() .array()
.min(0) .min(0)