mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-04 17:37:24 +00:00
SpaceAPI: lowercase values for state.open
This commit is contained in:
parent
585622403c
commit
ac5fa47388
3 changed files with 5 additions and 5 deletions
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
"attributes": {
|
||||
"open": {
|
||||
"type": "enumeration",
|
||||
"enum": ["True", "False", "Undefined"],
|
||||
"enum": ["true", "false", "undefined"],
|
||||
"default": "Undefined"
|
||||
},
|
||||
"trigger_person": {
|
||||
|
|
|
|||
2
types/generated/contentTypes.d.ts
vendored
2
types/generated/contentTypes.d.ts
vendored
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue