SpaceAPI: lowercase values for state.open

This commit is contained in:
He4eT 2025-05-30 17:48:07 +02:00
commit ac5fa47388
3 changed files with 5 additions and 5 deletions

View file

@ -130,10 +130,10 @@ export default ({ strapi }: { strapi: Core.Strapi }) => ({
if (!isEmpty(state)) { if (!isEmpty(state)) {
result.state = pickFields(['trigger_person', 'message'])(state); result.state = pickFields(['trigger_person', 'message'])(state);
if (['True', 'False'].includes(state.open)) { if (['true', 'false'].includes(state.open)) {
result.state.open = { result.state.open = {
True: true, true: true,
False: false, false: false,
}[state.open]; }[state.open];
} }

View file

@ -13,7 +13,7 @@
"attributes": { "attributes": {
"open": { "open": {
"type": "enumeration", "type": "enumeration",
"enum": ["True", "False", "Undefined"], "enum": ["true", "false", "undefined"],
"default": "Undefined" "default": "Undefined"
}, },
"trigger_person": { "trigger_person": {

View file

@ -885,7 +885,7 @@ export interface ApiStateState extends Struct.SingleTypeSchema {
localizations: Schema.Attribute.Relation<'oneToMany', 'api::state.state'> & localizations: Schema.Attribute.Relation<'oneToMany', 'api::state.state'> &
Schema.Attribute.Private; Schema.Attribute.Private;
message: Schema.Attribute.String; message: Schema.Attribute.String;
open: Schema.Attribute.Enumeration<['True', 'False', 'Undefined']> & open: Schema.Attribute.Enumeration<['true', 'false', 'undefined']> &
Schema.Attribute.DefaultTo<'Undefined'>; Schema.Attribute.DefaultTo<'Undefined'>;
publishedAt: Schema.Attribute.DateTime; publishedAt: Schema.Attribute.DateTime;
trigger_person: Schema.Attribute.String; trigger_person: Schema.Attribute.String;