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)) {
result.state = pickFields(['trigger_person', 'message'])(state);
if (['True', 'False'].includes(state.open)) {
if (['true', 'false'].includes(state.open)) {
result.state.open = {
True: true,
False: false,
true: true,
false: false,
}[state.open];
}

View file

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

View file

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